1
<?php

global $oswcPostTypes;



//this is the folder that houses the function files to include

define('functions', TEMPLATEPATH . '/functions');



function fixObject (&$object)

{

if (!is_object ($object) && gettype ($object) == 'object')

return ($object = unserialize (serialize ($object)));

return $object;

}



$lang = TEMPLATEPATH . '/lang';

load_theme_textdomain('made', $lang);



//Get the post type functions

require_once(functions . '/oswc-post-types.php');



//Get the theme options

require_once(functions . '/theme-options.php');



//Get the review options

require_once(functions . '/review-options.php');



//Get the widgets

require_once(functions . '/widgets.php');



//Get the custom functions

require_once(functions . '/custom.php');



//Get the shortcodes

require_once(functions . '/shortcodes.php');



//Get the post type functions

require_once(functions . '/post-types.php');



//Get the post & page meta boxes

require_once(functions . '/meta-boxes.php');



//notifies users of updates

require('update-notifier.php');

//gallery

function my_gallery_to_slideshow_has_gallery( $params ){

return true;
**//this is the line 90 :(**
}

add_filter( 'mv_gallery_to_slideshow_has_gallery',    'my_gallery_to_slideshow_has_gallery' );



// average rating shortcode

function get_ppic(){

echo do_action( 'wordpress_social_login' );

}

add_shortcode('via-twitter','get_ppic');



function limit_posts_per_archive_page() {

if ( is_category() )

    set_query_var('posts_per_archive_page', 9); // or use variable key:     posts_per_page

}



add_filter('pre_get_posts', 'limit_posts_per_archive_page');



function the_slug() 

{

$abc = $_GET['post_id'];    

$post_data = get_post($abc, ARRAY_A);   

$slug = $post_data['post_name'];    

return $slug; 

}



function category_has_parent($catid){

$category = get_category($catid);

if ($category->category_parent > 0){

    return true;

}

return false;

}

/*Created by Albert*/

/end/

add_action('frm_after_create_entry', 'copy_into_my_table', 20, 2);

function copy_into_my_table($entry_id, $form_id){

if($form_id == 6){ //change 4 to the form id of the form to copy

global $wpdb;

$values = array('c_id' => NULL, 'review_title' => $_POST['item_meta'][86], 'post_title'    => $_POST['item_meta'][129], 'post_id' => $_POST['item_meta'][94]);

//replace 25 and 26 with the field ids of the Formidable form. Change col_name to the   column names in your table

$wpdb->insert('wp_magic_competition', $values);

 }

}

<!-- added -->
add_filter('frm_get_default_value', 'my_custom_default_value', 10, 2);
function my_custom_default_value($new_value, $field){
if($field->id == 25){ //change 25 to the ID of the field
$new_value = 'custom default'; //set your custom value here
}
return $new_value;
}
<!-- added -->

?>

Can't find what was the cause of the error..Im having an error after adding the code inside anyone can help me..thanks..formidable pro hooks , wordpress...
many thanks in advance :) Parse error: syntax error, unexpected $end in /home/wpperhou/public_html/dev/aor/thesports/wp-content/themes/made/functions.php on line 90

4
  • I'm guessing the code you've shown us is not from functions.php, which is where the error is occurring. You should be showing us what's around line 90 in functions.php. Commented Nov 21, 2012 at 6:39
  • can you show which is line 90? Commented Nov 21, 2012 at 6:39
  • after return true; inside function my_gallery_to_slideshow_has_gallery( $params ) Commented Nov 21, 2012 at 6:42
  • 1
    Can you try re-uploading the file? Because if the first code block is the complete content of your functions.php file, then it should not cause a fatal error with unexpected $end. That usually happens when you haven't closed a code block(be it if while for foreach...), which can occur if your upload fails in the middle for some reason(I would most-often see those errors while the file is being uploaded, but I guess that's not the problem now). Commented Nov 21, 2012 at 8:27

2 Answers 2

0

I think it's this:

function limit_posts_per_archive_page() {

if ( is_category() )

    set_query_var('posts_per_archive_page', 9); // or use variable key:     posts_per_page

}



add_filter('pre_get_posts', 'limit_posts_per_archive_page');

I can't see a closing } for the function.

I'm going to guess that this should fix it:

function limit_posts_per_archive_page() {

if ( is_category() )

    set_query_var('posts_per_archive_page', 9); // or use variable key:     posts_per_page

}

}

add_filter('pre_get_posts', 'limit_posts_per_archive_page');

EDIT : Ignore this it's totally wrong.. I'm not one for if's without braces damnit!! (I'll leave it here for the lolz)

Sign up to request clarification or add additional context in comments.

Comments

0

Can you try to

  • Add a closing PHP tag (?>) at the end of your file
  • Reupload your file to the server. Sometimes I get the same error as you and it does the trick. This could be caused by a ftp error.

Maxime

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.