carter90 Posted May 10, 2013 Share Posted May 10, 2013 $options = array( 'title' => __( 'Slider', 'yit' ), 'options' => array( '' => __( 'Default', 'yit' ), 'none' => __( 'None', 'yit' ) ) + yit_get_sliders(), 'desc' => __( 'Select the slider that you want to use in the page.', 'yit' ), ); yit_add_option_metabox( 'yit-page-settings', __( 'Header', 'yit' ), '_slider_name', 'select', $options ); yit_metaboxes_sep( 'yit-page-settings', __( 'Header', 'yit' ) ); $options = array( 'title' => __( 'Use static image', 'yit' ), 'desc' => __( 'Set YES if you want a static header, instead of the slider.', 'yit' ), 'std' => 0 ); yit_add_option_metabox( 'yit-page-settings', __( 'Header', 'yit' ), '_use_static_image', 'onoff', $options ); $options = array( 'title' => __( 'Static image', 'yit' ), 'desc' => __( 'Upload here the image to use for the static header, only if you have set to YES the option above.', 'yit' ), 'std' => '' ); yit_add_option_metabox( 'yit-page-settings', __( 'Header', 'yit' ), '_static_image', 'upload', $options ); $options = array( 'title' => __( 'Static image Link', 'yit' ), 'desc' => __( 'The URL where the fixed image will link.', 'yit' ), 'std' => '' ); ); yit_add_option_metabox( 'yit-page-settings', __( 'Header', 'yit' ), '_static_image_link', 'text', $options ); $options = array( 'title' => __( 'Static image target', 'yit' ), 'desc' => __( 'How to open the link of the static image.', 'yit' ), 'options' => array( '_self' => __( 'Default', 'yit' ), '_parent' => __( 'Parent frameset', 'yit' ), '_top' => __( 'Full body of the window', 'yit' ), '_blank' => __( 'In a new window', 'yit' ), ), ); yit_add_option_metabox( 'yit-page-settings', __( 'Header', 'yit' ), '_static_image_target', 'select', $options ); Not sure what is wrong with it as far as I can see. Anyone got an idea? Quote Link to comment https://forums.phpfreaks.com/topic/277886-syntax-error-unexpected/ Share on other sites More sharing options...
Psycho Posted May 10, 2013 Share Posted May 10, 2013 (edited) Perhaps providing the entire error message (including the line number) and showing where that line is int he code you provided would be helpful. EDIT: But a quick check shows this $options = array( 'title' => __( 'Static image Link', 'yit' ), 'desc' => __( 'The URL where the fixed image will link.', 'yit' ), 'std' => '' ); ); // <======= But, once that is fixed you will get different errors because all of the values using the underscores followed by a value in parenthesis will cause an issue - unless you actually have a function with the name "__". Edited May 10, 2013 by Psycho Quote Link to comment https://forums.phpfreaks.com/topic/277886-syntax-error-unexpected/#findComment-1429548 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.