示例#1
0
 function init_metabox()
 {
     $metabox = array('id' => 'st_location', 'title' => __('Location Setting', ST_TEXTDOMAIN), 'pages' => array('location'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('label' => __('Location settings', ST_TEXTDOMAIN), 'id' => 'location_tab', 'type' => 'tab'), array('label' => __('Logo', ST_TEXTDOMAIN), 'id' => 'logo', 'type' => 'upload', 'desc' => __('logo', ST_TEXTDOMAIN)), array('label' => __('Set as Featured', ST_TEXTDOMAIN), 'id' => 'is_featured', 'type' => 'on-off', 'desc' => __('This location is set as featured', ST_TEXTDOMAIN), 'std' => 'off'), array('label' => __('Country', ST_TEXTDOMAIN), 'id' => 'location_country', 'type' => 'select', 'choices' => TravelHelper::_get_location_country(), 'desc' => __('Country of this location', ST_TEXTDOMAIN)), array('label' => __('Zip Code', ST_TEXTDOMAIN), 'id' => 'zipcode', 'type' => 'text', 'desc' => __('Zip code of this location', ST_TEXTDOMAIN)), array('label' => __('Maps', ST_TEXTDOMAIN), 'id' => 'st_google_map', 'type' => 'bt_gmap', 'desc' => __('Maps', ST_TEXTDOMAIN)), array('label' => __('Use build layout', ST_TEXTDOMAIN), 'id' => 'st_location_use_build_layout', 'type' => 'on-off', 'desc' => __('Turn it on to display layout'), 'std' => 'off'), array('label' => __('Location gallery display', ST_TEXTDOMAIN), 'id' => 'location_gallery_setting', 'type' => 'tab'), array('label' => __('Location gallery style', ST_TEXTDOMAIN), 'id' => 'location_gallery_style', 'type' => 'select', 'desc' => __('Select your location style', ST_TEXTDOMAIN), 'choices' => array(array('value' => '', 'label' => __('--- Select ---', ST_TEXTDOMAIN)), array('value' => '1', 'label' => __('Fotorama stage', ST_TEXTDOMAIN)), array('value' => '2', 'label' => __('Fotorama stage without nav', ST_TEXTDOMAIN)), array('value' => '3', 'label' => __('Light box gallery', ST_TEXTDOMAIN)))), array('label' => __('Images per row', ST_TEXTDOMAIN), 'id' => 'image_count', 'type' => 'select', 'desc' => __('Choose your count num', ST_TEXTDOMAIN), 'condition' => 'location_gallery_style:is(3)', 'choices' => array(array('value' => '', 'label' => __(' --- Select ---', ST_TEXTDOMAIN)), array('value' => '3', 'label' => __('3 images', ST_TEXTDOMAIN)), array('value' => '4', 'label' => __('4 images', ST_TEXTDOMAIN)), array('value' => '6', 'label' => __('6 images', ST_TEXTDOMAIN)), array('value' => '12', 'label' => __('12 images', ST_TEXTDOMAIN)))), array('label' => __('Location gallery', ST_TEXTDOMAIN), 'id' => 'st_gallery', 'type' => 'gallery'), array('label' => __('Location tab setting', ST_TEXTDOMAIN), 'id' => 'location_tab_setting', 'type' => 'tab'), array('label' => __('Tab navigation position', ST_TEXTDOMAIN), 'id' => 'tab_position', 'type' => 'select', 'desc' => __('Choose your tab Navigation position', ST_TEXTDOMAIN), 'choices' => array(array('value' => '', 'label' => __(' --- Select ---', ST_TEXTDOMAIN)), array('value' => 'top', 'label' => __('Top', ST_TEXTDOMAIN)), array('value' => 'right', 'label' => __('Right', ST_TEXTDOMAIN)), array('value' => 'left', 'label' => __('Left', ST_TEXTDOMAIN)))), array('label' => __("Information text title", ST_TEXTDOMAIN), 'id' => 'information_text_title', 'type' => 'text', 'desc' => __("Name of Information tab", ST_TEXTDOMAIN), 'std' => __("Location Information", ST_TEXTDOMAIN)), array('label' => __("Information icon class", ST_TEXTDOMAIN), 'id' => 'tab_icon_info_icon', 'type' => 'text', 'std' => __("fa fa-info", ST_TEXTDOMAIN)), array('label' => __('Show Information tab item', ST_TEXTDOMAIN), 'id' => 'info_location_tab_item_enable', 'type' => 'on-off', 'desc' => __('<b>Enable </b> it to add item into information tab, <b>Disable </b> to get content of Location', ST_TEXTDOMAIN), 'std' => 'off'), array('label' => __('Information tab item position', ST_TEXTDOMAIN), 'id' => 'info_location_tab_item_position', 'type' => 'select', 'choices' => array(array('value' => '', 'label' => __(' --- Select ---', ST_TEXTDOMAIN)), array('value' => 'top', 'label' => __('Top', ST_TEXTDOMAIN)), array('value' => 'right', 'label' => __('Right', ST_TEXTDOMAIN)), array('value' => 'left', 'label' => __('Left', ST_TEXTDOMAIN))), 'condition' => 'info_location_tab_item_enable:is(on)', 'std' => 'on'), array('label' => __('Information tab Item', ST_TEXTDOMAIN), 'id' => 'info_tab_item', 'type' => 'list-item', 'desc' => __('Add new item for location information tab', ST_TEXTDOMAIN), 'condition' => 'info_location_tab_item_enable:is(on)', 'settings' => array(array('id' => 'post_info_select', 'label' => __('Post from', ST_TEXTDOMAIN), 'type' => 'post_select', 'post_type' => 'post', 'placeholder' => __('Select a post', ST_TEXTDOMAIN))), array('id' => 'post_info_icon', 'label' => __('icon ', ST_TEXTDOMAIN), 'type' => 'text')), array('label' => __("Tab item", ST_TEXTDOMAIN), 'id' => 'location_tab_item', 'type' => 'list-item', 'desc' => __('Add new item to create new tab', ST_TEXTDOMAIN), 'condition' => 'info_location_tab_item_enable:is(on)', 'std' => self::get_opt_list_std(), 'settings' => array(array('id' => 'tab_icon_', 'label' => __('Tab icon', ST_TEXTDOMAIN), 'type' => 'text', 'std' => 'fa-star-o'), array('id' => 'tab_type', 'label' => __("Type", ST_TEXTDOMAIN), 'type' => 'select', 'choices' => self::get_opt_list(), 'std' => 'st_cars'), array('id' => 'map_height', 'label' => __('Map height', ST_TEXTDOMAIN), 'type' => 'text', 'condition' => 'tab_type:is(st_map)', 'std' => '500'), array('id' => 'map_spots', 'label' => __('Maxium number of spots', ST_TEXTDOMAIN), 'type' => 'text', 'condition' => 'tab_type:is(st_map)', 'std' => '500'), array('label' => __('Map style', ST_TEXTDOMAIN), 'id' => 'map_location_style', 'type' => 'select', 'condition' => 'tab_type:is(st_map)', 'std' => 'normal', 'choices' => array(array('value' => 'normal', 'label' => __('Normal', ST_TEXTDOMAIN)), array('value' => 'midnight', 'label' => __('Midnight', ST_TEXTDOMAIN)), array('value' => 'family_fest', 'label' => __('Family fest', ST_TEXTDOMAIN)), array('value' => 'open_dark', 'label' => __('Open dark', ST_TEXTDOMAIN)), array('value' => 'riverside', 'label' => __('River side', ST_TEXTDOMAIN)), array('value' => 'ozan', 'label' => __('Ozan', ST_TEXTDOMAIN))))))));
     $this->metabox[] = $metabox;
 }