array( 'title'=> __('SIDEBAR TEMPLATE', 'gdl_back_office'), 'name'=>'post-option-sidebar-template', 'type'=>'radioimage', 'default'=>$default_post_sidebar, 'hr'=>'none', 'options'=>array( '1'=>array('value'=>'right-sidebar','default'=>'selected','image'=>'/include/images/right-sidebar.png'), '2'=>array('value'=>'left-sidebar','image'=>'/include/images/left-sidebar.png'), '3'=>array('value'=>'both-sidebar','image'=>'/include/images/both-sidebar-1.png'), '4'=>array('value'=>'both-sidebar-reverse','image'=>'/include/images/both-sidebar-2.png'), '5'=>array('value'=>'no-sidebar','image'=>'/include/images/no-sidebar.png'))), "Choose Left Sidebar" => array( 'title'=> __('CHOOSE LEFT SIDEBAR', 'gdl_back_office'), 'name'=>'post-option-choose-left-sidebar', 'type'=>'combobox', 'hr'=>'none', 'default'=>$default_post_left_sidebar ), "Choose Right Sidebar" => array( 'title'=> __('CHOOSE RIGHT SIDEBAR', 'gdl_back_office'), 'name'=>'post-option-choose-right-sidebar', 'type'=>'combobox', 'default'=>$default_post_right_sidebar ), "Author Infomation" => array( 'title'=> __('SHOW AUTHOR INFORMATION', 'gdl_back_office'), 'name'=>'post-option-author-info-enabled', 'type'=>'combobox', 'options'=>array('0'=>'Yes','1'=>'No')), "Social Sharing" => array( 'title'=> __('SOCIAL NETWORK SHARING', 'gdl_back_office'), 'name'=>'post-option-social-enabled', 'type'=>'combobox', 'options'=>array('0'=>'Yes','1'=>'No')), // thumbnail "Thumbnail Types" => array( 'title'=> __('THUMBNAIL TYPES', 'gdl_back_office'), 'name'=>'post-option-thumbnail-types', 'options'=>array( '0'=>'Image', '1'=>'Video', '2'=>'Slider', '3'=>'HTML5 Video'), 'type'=>'combobox', 'hr'=>'none', 'description'=>'This is the thumbnail of the blog when using the blog item in page options.'), // image thumbnail "Open Thumbnail Image" => array('type'=>'open','id'=>'thumbnail-feature-image'), "Thumbnail Image" => array( 'title'=> __('Use Featured Image as Thumbnail Image', 'gdl_back_office'), 'name'=>'post-option-featured-image', 'type'=>'text', ), "Close Thumbnail Image" => array('type'=>'close'), // video thumbnail "Open Thumbnail Video" => array('type'=>'open','id'=>'thumbnail-video'), "Thumbnail Video Url" => array( 'title'=> __('VIDEO URL', 'gdl_back_office'), 'name'=>'post-option-thumbnail-video', 'type'=>'inputtext', 'description'=>'Place the url of video you want here. This theme only supports video from Youtube and Vimeo.'), "Close Thumbnail Video" => array('type'=>'close'), // slider thumbnail "Open Thumbnail Slider" => array('type'=>'open','id'=>'thumbnail-slider'), "Thumbnail Slider" => array( 'type'=> 'imagepicker', 'title'=> __('SELECT IMAGES', 'gdl_back_office'), 'xml'=>'post-option-thumbnail-xml', 'name'=>array( 'image'=>'post-option-thumbnail-slider-image', 'title'=>'post-option-thumbnail-slider-title', 'caption'=>'post-option-thumbnail-slider-caption', 'link'=>'post-option-thumbnail-slider-link', 'linktype'=>'post-option-thumbnail-slider-linktype'), 'hr'=>'none' ), "Close Thumbnail Slider" => array('type'=>'close'), // inside post thumbnail html5 video "Open Thumbnail HTML5 Video" => array('type'=>'open','id'=>'thumbnail-html5-video'), "Thumbnail HTML5 Video" => array( 'title'=> __('HTML5 VIDEO', 'gdl_back_office'), 'name'=>'post-option-thumbnail-html5-video', 'description'=>'You have to install the JWPlayer plugin for wordpress before this option can be used.' . ' Please try seeing more information in the documentation we provided.', 'type'=>'media-upload'), "Close Thumbnail HTML5 Video" => array('type'=>'close'), // inside post thumbnails "Inside Thumbnail Types" => array( 'title'=> __('INSIDE POST THUMBNAIL TYPES', 'gdl_back_office'), 'name'=>'post-option-inside-thumbnail-types', 'options'=>array( '0'=>'Image', '1'=>'Video', '2'=>'Slider', '3'=>'HTML5 Video'), 'type'=>'combobox', 'hr'=>'none', 'description'=>'This is the thumbnail inside the blog post.'), // inside post thumbnail image "Open Inside Thumbnail Image" => array('type'=>'open','id'=>'inside-thumbnail-image'), "Inside Thumbnail Image" => array( 'title'=> __('SELECT IMAGE', 'gdl_back_office'), 'name'=>'post-option-inside-thumbnial-image', 'type'=>'upload', 'hr'=>'none'), "Close Inside Thumbnail Image" => array('type'=>'close'), // inside post thumbnail video "Open Inside Thumbnail Video" => array('type'=>'open','id'=>'inside-thumbnail-video'), "Inside Thumbnail Video Url" => array( 'title'=> __('VIDEO URL', 'gdl_back_office'), 'name'=>'post-option-inside-thumbnail-video', 'type'=>'inputtext', 'hr'=>'none', 'description'=>'Place the url of video you want here. This theme only supports video from Youtube and Vimeo.'), "Close Inside Thumbnail Video" => array('type'=>'close'), // inside post thumbnail slider "Open Inside Thumbnail Slider" => array('type'=>'open','id'=>'inside-thumbnail-slider'), "Inside Thumbnail Slider" => array( 'type'=>'imagepicker', 'title'=> __('SELECT IMAGES', 'gdl_back_office'), 'xml'=>'post-option-inside-thumbnail-xml', 'name'=>array( 'image'=>'post-option-inside-thumbnail-slider-image', 'title'=>'post-option-inside-thumbnail-slider-title', 'caption'=>'post-option-inside-thumbnail-slider-caption', 'link'=>'post-option-inside-thumbnail-slider-link', 'linktype'=>'post-option-inside-thumbnail-slider-linktype'), 'hr'=>'none' ), "Close Inside Thumbnail Slider" => array('type'=>'close'), // inside post thumbnail html5 video "Open Inside Thumbnail HTML5 Video" => array('type'=>'open','id'=>'inside-thumbnail-html5-video'), "Inside Thumbnail HTML5 Video Url" => array( 'title'=> __('HTML5 VIDEO', 'gdl_back_office'), 'name'=>'post-option-inside-thumbnail-html5-video', 'type'=>'media-upload', 'description'=>'You have to install the JWPlayer plugin for wordpress before this option can be used.' . ' Please try seeing more information in the documentation we provided.', 'hr'=>'none'), "Close Inside Thumbnail HTML5 Video" => array('type'=>'close'), ); add_action('add_meta_boxes', 'add_post_option'); function add_post_option(){ add_meta_box('post-option', __('Post Option','gdl_back_office'), 'add_post_option_element', 'post', 'normal', 'high'); } function add_post_option_element(){ global $post, $post_meta_boxes; // init array $post_meta_boxes['Choose Left Sidebar']['options'] = get_sidebar_name(); $post_meta_boxes['Choose Right Sidebar']['options'] = $post_meta_boxes['Choose Left Sidebar']['options']; echo '