Jump to content

Recommended Posts

$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?

Link to comment
https://forums.phpfreaks.com/topic/277886-syntax-error-unexpected/
Share on other sites

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 by Psycho
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.