Пример #1
1
function _custom_meta_boxes()
{
    $post_meta_box = array('id' => 'post_meta_box', 'title' => 'Дополнительные параметры', 'desc' => '', 'pages' => array('post', 'portfolio'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('label' => 'Особенности', 'id' => 'featured', 'type' => 'radio', 'std' => 'featured_no', 'desc' => 'Сделать этот пост особенным. (По умолчанию: нет)', 'choices' => array(array('label' => 'Да', 'value' => 'featured_yes'), array('label' => 'Нет', 'value' => 'featured_no')))));
    $page_meta_box = array('id' => 'page_meta_box', 'title' => 'Настройки страницы', 'desc' => '', 'pages' => array('page'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('label' => 'Подзаголовок', 'id' => 'subheading', 'type' => 'text')));
    $slider_meta_box = array('id' => 'slider_meta_box', 'title' => 'Настройка слайдера', 'desc' => 'Выбирайте варианты, если вы хотите показать слайдер на этой странице. Вы можете редактировать содержимое слайдера в настройках темы.', 'pages' => array('page'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('label' => 'Отображение слайдера', 'id' => 'slider_button', 'type' => 'checkbox', 'desc' => 'Показать / скрыть слайдер для этой страницы. (По-умолчанию: скрыто)', 'choices' => array(array('label' => 'Показать', 'value' => 'slider_on'))), array('label' => 'Стиль слайдера', 'id' => 'slider_checkbox', 'type' => 'checkbox', 'desc' => 'Выберите стиль слайдера. На всю ширину слайдер будет работать только для соответствующих страниц. (По-умолчанию: блок)', 'choices' => array(array('label' => 'На всю ширину', 'value' => 'ful_width')))));
    $team_meta_box = array('id' => 'team_meta_box', 'title' => 'Подробности о представителе', 'desc' => '', 'pages' => array('team'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('label' => 'Обозначение', 'id' => 'designation', 'type' => 'text'), array('label' => 'Содержимое правой колонки', 'id' => 'right_col', 'type' => 'textarea'), array('label' => 'Facebook Profile URL', 'id' => 'team_fb', 'type' => 'text'), array('label' => 'Twitter Profile URL', 'id' => 'team_twt', 'type' => 'text'), array('label' => 'Google Plus Profile URL', 'id' => 'team_gplus', 'type' => 'text'), array('label' => 'Flickr Profile URL', 'id' => 'team_flickr', 'type' => 'text')));
    $services_meta_box = array('id' => 'services_meta_box', 'title' => 'Настройки сервисов', 'desc' => 'Выберите иконку для этого сервиса. (Опционально)', 'pages' => array('services'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('label' => 'icons_textblock', 'id' => 'icons_textblock', 'type' => 'textblock', 'desc' => 'Введите возможное значение: glass, music, search, star, star-empty, heart, user, envelope, film, th, th-large, th-list, ok, remove, zoom-in, zoom-out, off, signal, cog, trash, home, file, time, road, download, upload, download-alt, inbox, play-circle, repeat, refresh, lock, list-alt, flag, headphones, volume-off, volume-off, volume-down, qrcode, barcode, tag, tags, book, bookmark, print, camera, font, bold, italic, text-height, text-width, align-left, align-right, align-center, align-justify, list, indent-left, indent-right, facetime-video, picture, pencil, map-marker, adjust, tint, edit, share, check, move, step-backward, fast-backward, backward, play, pause, stop, forward, fast-forward, step-forward, eject, chevron-left, chevron-right, plus-sign, minus-sign, remove-sign, ok-sign, question-sign, info-sign, remove-circle, screenshot, ok-circle, ban-circle, arrow-left, arrow-right, arrow-up, arrow-down, resize-full, share-alt, resize-small, plus, minus, asterisk, exclamation-sign, gift, leaf, fire, eye-open, eye-close, warning-sign, plane, calendar, rendom, comment, magnet, chevron-up, chevron-down, retweet, shopping-cart, folder-close, folder-open, resize-vertical, resize-horizontal, hdd, bullhorn, bell, certificate, thumbs-up, thumbs-down, hand-right, hand-left, hand-up, hand-down, circle-arrow-right, circle-arrow-left, circle-arrow-up, circle-arrow-down, globe, wrench, tasks, filter, briefcase, fullscreen'), array('label' => 'Иконка сервиса', 'id' => 'services_icon', 'type' => 'text', 'desc' => '')));
    /*
    $post_id = (isset($_GET['post'])) ? $_GET['post'] : ((isset($_POST['post_ID'])) ? $_POST['post_ID'] : false);
    
        if ($post_id) :
    
            $post_template = get_post_meta($post_id, '_wp_page_template', true);
    
            if ($post_template == 'template-home.php') {
                ot_register_meta_box($my_meta_box);
            }
    
        endif;
    */
    ot_register_meta_box($post_meta_box);
    ot_register_meta_box($page_meta_box);
    ot_register_meta_box($slider_meta_box);
    ot_register_meta_box($team_meta_box);
    ot_register_meta_box($services_meta_box);
}
Пример #2
0
/**
 * Meta Boxes demo code.
 *
 * You can find all the available option types
 * in demo-theme-options.php.
 *
 * @return    void
 *
 * @access    private
 * @since     2.0
 */
function _custom_meta_boxes()
{
    /**
     * Create a custom meta boxes array that we pass to
     * the OptionTree Meta Box API Class.
     */
    $meta_box_layout = array('id' => 'pp_metabox_sidebar', 'title' => __('Layout', 'chow'), 'desc' => __('You can choose a sidebar from the list below. Sidebars can be created in the Theme Options and configured in the Appearance -> Widgets.', 'chow'), 'pages' => array('post'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('id' => 'pp_sidebar_layout', 'label' => __('Layout', 'chow'), 'desc' => '', 'std' => 'left-sidebar', 'type' => 'radio_image', 'class' => '', 'choices' => array(array('value' => 'left-sidebar', 'label' => 'Left Sidebar', 'src' => OT_URL . '/assets/images/layout/left-sidebar.png'), array('value' => 'right-sidebar', 'label' => 'Right Sidebar', 'src' => OT_URL . '/assets/images/layout/right-sidebar.png'))), array('id' => 'pp_sidebar_set', 'label' => __('Sidebar', 'chow'), 'desc' => '', 'std' => '', 'type' => 'sidebar-select', 'class' => '')));
    $meta_box_layout_page = array('id' => 'pp_metabox_sidebar', 'title' => __('Layout', 'chow'), 'desc' => __('You can choose a sidebar from the list below. Sidebars can be created in the Theme Options and configured in the Appearance -> Widgets.', 'chow'), 'pages' => array('page'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('id' => 'pp_sidebar_layout', 'label' => __('Layout', 'chow'), 'desc' => '', 'std' => 'full-width', 'type' => 'radio_image', 'class' => '', 'choices' => array(array('value' => 'left-sidebar', 'label' => __('Left Sidebar', 'chow'), 'src' => OT_URL . '/assets/images/layout/left-sidebar.png'), array('value' => 'right-sidebar', 'label' => __('Right Sidebar', 'chow'), 'src' => OT_URL . '/assets/images/layout/right-sidebar.png'), array('value' => 'full-width', 'label' => __('Full Width (no sidebar)', 'chow'), 'src' => OT_URL . '/assets/images/layout/full-width.png'))), array('id' => 'pp_sidebar_set', 'label' => 'Sidebar', 'desc' => '', 'std' => '', 'type' => 'sidebar-select', 'class' => '')));
    $current_sliders = get_option('cp_sliders');
    // Iterate over the sliders
    if ($current_sliders) {
        foreach ($current_sliders as $key => $item) {
            $cpsliders[] = array('label' => $item->name, 'value' => $item->slug);
        }
    } else {
        $cpsliders[] = array('label' => 'No Sliders Found', 'value' => '');
    }
    $slider = array('id' => 'pp_metabox_cpslider', 'title' => 'Slider settings', 'desc' => 'If you want to use  Slider on this page, select page template "Slider Page" and choose here slider you want to display.', 'pages' => array('page'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('id' => 'pp_page_slider', 'label' => 'Slider', 'desc' => '', 'std' => '', 'type' => 'select', 'choices' => $cpsliders, 'class' => '')));
    $bg = array('id' => 'pp_metabox_post_options', 'title' => 'Фоновое изображение для заголовка поста', 'desc' => '', 'pages' => array('post'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('id' => 'pp_header_bg', 'label' => 'Фон заголовка ', 'desc' => 'Установите изображение для заголовка, ширина должна быть 1920px.', 'std' => '', 'type' => 'upload', 'class' => 'ot-upload-attachment-id')));
    $sliderimage = array('id' => 'pp_metabox_post_slider', 'title' => 'Выберите изображение для слайдера (усли не выбрано, Featured изображение будет использоваться)', 'desc' => '', 'pages' => array('post'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('id' => 'pp_post_slider_img', 'label' => 'Изображение для слайдера', 'desc' => 'Лучше использовать изображения размером 1920px x 590px.', 'std' => '', 'type' => 'upload', 'class' => 'ot-upload-attachment-id')));
    $productsoptions = array('id' => 'pp_metabox_products', 'title' => 'Product page Options', 'pages' => array('product'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('id' => 'pp_sidebar_layout', 'label' => 'Layout', 'desc' => '', 'std' => 'full-width', 'type' => 'radio_image', 'class' => '', 'choices' => array(array('value' => 'full-width', 'label' => 'Full Width (no sidebar)', 'src' => OT_URL . '/assets/images/layout/full-width.png'), array('value' => 'left-sidebar', 'label' => 'Left Sidebar', 'src' => OT_URL . '/assets/images/layout/left-sidebar.png'), array('value' => 'right-sidebar', 'label' => 'Right Sidebar', 'src' => OT_URL . '/assets/images/layout/right-sidebar.png')))));
    /**
     * Register our meta boxes using the
     * ot_register_meta_box() function.
     */
    ot_register_meta_box($productsoptions);
    ot_register_meta_box($meta_box_layout);
    ot_register_meta_box($meta_box_layout_page);
    ot_register_meta_box($bg);
    ot_register_meta_box($sliderimage);
    ot_register_meta_box($slider);
}
/**
 * Meta Boxes.
 *
 * @return    void
 * @since     2.0
 */
function custom_meta_boxes()
{
    $about_meta_box = array('id' => 'about_meta_box', 'title' => __('Parameters for "About" page', 'asana'), 'desc' => '', 'pages' => array('page'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('label' => __('Additional info', 'asana'), 'id' => 'tab_add_info', 'type' => 'tab'), array('label' => __('Enable "meet our team" block?', 'asana'), 'id' => 'uni_meet_team_enable', 'type' => 'on-off', 'desc' => __('Show or hide "meet our team" block', 'asana'), 'std' => 'on'), array('label' => __('Title for "meet our team" block', 'asana'), 'id' => 'uni_meet_team_title', 'type' => 'text', 'desc' => __('Add title for "meet our team" block', 'asana'), 'std' => 'meet our team'), array('label' => __('Enable Values section on "About" page?', 'asana'), 'id' => 'uni_about_values_enable', 'type' => 'on-off', 'desc' => __('Show or hide Values section', 'asana'), 'std' => 'on'), array('label' => __('Title for Values section on "About" page', 'asana'), 'id' => 'uni_about_values_title', 'type' => 'text', 'desc' => __('Add title for Values section. Default is "our values"', 'asana'), 'std' => 'our values'), array('label' => __('Enable Instagram block?', 'asana'), 'id' => 'uni_instagram_enable', 'type' => 'on-off', 'desc' => __('Show or hide Instagram block', 'asana'), 'std' => 'on')));
    $contact_meta_box = array('id' => 'contact_meta_box', 'title' => __('Parameters for "Contact" page', 'asana'), 'desc' => '', 'pages' => array('page'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('label' => __('Additional info', 'asana'), 'id' => 'tab_add_info', 'type' => 'tab'), array('label' => '', 'id' => 'contact_textblock', 'type' => 'textblock', 'desc' => sprintf(__('A lot of options for this page is also located on <a href="%s">theme options page</a>.', 'asana'), trailingslashit(home_url()) . 'wp-admin/themes.php?page=ot-theme-options#section_contact'), 'operator' => 'and', 'condition' => ''), array('label' => __('Contact page gallery', 'asana'), 'id' => 'uni_gallery', 'type' => 'gallery', 'desc' => __('Images for gallery on "Contact" page.', 'asana'), 'condition' => ''), array('label' => __('Enable map?', 'asana'), 'id' => 'uni_map_enable', 'type' => 'on-off', 'desc' => __('Show or hide map', 'asana'), 'std' => 'on'), array('label' => __('Enable contact form?', 'asana'), 'id' => 'uni_form_enable', 'type' => 'on-off', 'desc' => __('Show or hide contact form', 'asana'), 'std' => 'on')));
    $classes_meta_box = array('id' => 'classes_meta_box', 'title' => __('Parameters for "Classes" page', 'asana'), 'desc' => '', 'pages' => array('page'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('label' => '', 'id' => 'classes_textblock', 'type' => 'textblock', 'desc' => __('This page is designed to showcase your classes schedule (or for similar events). You may add page header image simply by adding featured image to this page. You should use shortcode like [uni-calendar id="X"] where X is the ID of your calendar. Attention: you must enable plugin Uni Events Calendars Manager to be able to create calendars and events for them!', 'asana'), 'operator' => 'and', 'condition' => '')));
    $events_meta_box = array('id' => 'events_meta_box', 'title' => __('Parameters for "Events" page', 'asana'), 'desc' => '', 'pages' => array('page'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('label' => '', 'id' => 'events_textblock', 'type' => 'textblock', 'desc' => sprintf(__('This page is designed to display your events. Events are just like blog posts, but themed) Also you can add page headers image for this page on <a href="%s">theme options page</a>.', 'asana'), trailingslashit(home_url()) . 'wp-admin/themes.php?page=ot-theme-options#section_shop'), 'operator' => 'and', 'condition' => ''), array('label' => __('Show/hide list of categories.', 'asana'), 'id' => 'events_display_list_cats', 'type' => 'on-off', 'desc' => __('You can decide whether to show or not on this page a small and nice dropdown-like list of all categories of events.', 'asana'), 'std' => 'on'), array('id' => 'events_categories', 'label' => __('Display events from categories:', 'asana'), 'desc' => __('Use this option if you want to show events from certain categories only. If you don\'t choose any category, than all events will be shown on the page.', 'asana'), 'std' => '', 'type' => 'taxonomy-checkbox', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => 'uni_event_cat', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and')));
    $slider_meta_box = array('id' => 'slider_meta_box', 'title' => __('Parameters for Home Page Slide', 'asana'), 'desc' => '', 'pages' => array('uni_home_slides'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('label' => __('Additional info', 'asana'), 'id' => 'tab_add_info', 'type' => 'tab'), array('label' => __('URI for "learn more" button', 'asana'), 'id' => 'uni_slide_uri', 'type' => 'text', 'desc' => __('If you don\'t define an URI for this button, it won\'t be shown for this slider', 'asana')), array('label' => __('Label for "learn more" button', 'asana'), 'id' => 'uni_slide_label', 'type' => 'text', 'std' => 'learn more', 'desc' => ''), array('id' => 'uni_button_a_colour', 'label' => __('Colour for label of "learn more" button', 'asana'), 'desc' => '', 'std' => '#ffffff', 'type' => 'colorpicker', 'section' => 'tab_colours', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'uni_button_a_bg', 'label' => __('Background colour for "learn more" button', 'asana'), 'desc' => '', 'std' => '#168cb9', 'type' => 'colorpicker', 'section' => 'tab_colours', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'uni_button_a_bg_hover', 'label' => __('Background colour of hovered state for "learn more" button', 'asana'), 'desc' => '', 'std' => '#1b9fd2', 'type' => 'colorpicker', 'section' => 'tab_colours', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and')));
    $event_meta_box = array('id' => 'event_meta_box', 'title' => __('Parameters for Event', 'asana'), 'desc' => '', 'pages' => array('uni_event'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('label' => __('Additional info', 'asana'), 'id' => 'tab_add_info', 'type' => 'tab'), array('label' => __('Page header image', 'asana'), 'id' => 'uni_event_page_header_image', 'type' => 'gallery', 'desc' => __('Add image to page header. Nevertheless you can add more then one image, only the first one will be used!', 'asana'), 'condition' => ''), array('label' => __('Date of the event', 'asana'), 'id' => 'uni_event_date', 'type' => 'text', 'desc' => __('Add the date of the event', 'asana')), array('label' => __('Time of the event', 'asana'), 'id' => 'uni_event_time', 'type' => 'text', 'desc' => __('Add the time of the event', 'asana')), array('label' => __('Address of the event', 'asana'), 'id' => 'uni_event_address', 'type' => 'text', 'desc' => __('Add the address of the event', 'asana')), array('label' => __('Coordinates for the map', 'asana'), 'id' => 'uni_event_coord', 'type' => 'text', 'desc' => __('Add the coordinates of the event. Example: "41.404182,2.199451"', 'asana')), array('label' => __('Zoom', 'asana'), 'id' => 'uni_event_zoom', 'type' => 'text', 'desc' => __('Define zoom level. Example: "12"', 'asana')), array('label' => __('Price of a ticket', 'asana'), 'id' => 'uni_event_price', 'type' => 'text', 'desc' => __('Add price for ticket for the event. Examples: "$10" or "Free of charge"', 'asana')), array('label' => __('Enable/disable "join event" functionality for this event only!', 'asana'), 'id' => 'uni_local_events_join_on', 'type' => 'on-off', 'desc' => __('This option allows you to override "join event" global option.', 'asana'), 'std' => 'off'), array('label' => __('Custom text for the "join event" button and title for modal window connected with this button', 'asana'), 'id' => 'uni_local_events_button_text', 'type' => 'text', 'desc' => __('Default is "Join event"', 'asana'), 'std' => __('Join event', 'asana')), array('id' => 'uni_local_events_page', 'label' => __('Events page', 'asana'), 'desc' => __('This option allows you to override "Events page" global option. An URI to the page chosen here will be added to the link on this page only.', 'asana'), 'std' => '', 'type' => 'custom-post-type-select', 'section' => 'general', 'rows' => '', 'post_type' => 'page', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and')));
    $wishlist_meta_box = array('id' => 'wishlist_meta_box', 'title' => __('Parameters for Wishlist', 'asana'), 'desc' => '', 'pages' => array('page'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('label' => __('Additional info', 'asana'), 'id' => 'tab_add_info', 'type' => 'tab'), array('label' => __('Page header image', 'asana'), 'id' => 'uni_wishlist_page_header_image', 'type' => 'gallery', 'desc' => __('Add image to page header. Nevertheless you can add more then one image, only the first one will be used!', 'asana'), 'condition' => '')));
    $bridallist_meta_box = array('id' => 'bridallist_meta_box', 'title' => __('Parameters for Bridal list', 'asana'), 'desc' => '', 'pages' => array('page'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('label' => __('Additional info', 'asana'), 'id' => 'tab_add_info', 'type' => 'tab'), array('label' => __('Page header image', 'asana'), 'id' => 'uni_bridallist_page_header_image', 'type' => 'gallery', 'desc' => __('Add image to page header. Nevertheless you can add more then one image, only the first one will be used!', 'asana'), 'condition' => '')));
    $price_meta_box = array('id' => 'price_meta_box', 'title' => __('Parameters for Price', 'asana'), 'desc' => '', 'pages' => array('uni_price'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('label' => __('Additional info', 'asana'), 'id' => 'tab_add_info', 'type' => 'tab'), array('label' => __('Price value', 'asana'), 'id' => 'uni_price_val', 'type' => 'text', 'desc' => ''), array('label' => __('Currency sign', 'asana'), 'id' => 'uni_currency', 'type' => 'text', 'desc' => ''), array('label' => __('for... ?', 'asana'), 'id' => 'uni_period', 'type' => 'text', 'desc' => __('for example: "for 7 days", "for 1 year" etc.', 'asana')), array('label' => __('Custom text for "Order Now" button', 'asana'), 'id' => 'uni_order_button_text', 'type' => 'text', 'desc' => ''), array('label' => __('Enable/Disable external URI for "Order Now" button', 'asana'), 'id' => 'uni_order_button_ext_url_enable', 'type' => 'on-off', 'desc' => __('By default "Order Now" button opens a modal window with a simple ordering form. It sends information only, no payments. However, you can enable external URI for this button if you want, for instance, redirect your clients to PayPal or similar. Please, don\'t forget to add the URI, otherwise you won\'t see this button at all!', 'asana'), 'std' => 'off'), array('label' => __('Custom URI for "Order Now" button', 'asana'), 'id' => 'uni_order_button_uri', 'type' => 'text', 'desc' => '', 'condition' => 'uni_order_button_ext_url_enable:is(on)')));
    /**
     * Register our meta boxes using the
     * ot_register_meta_box() function.
     */
    if (function_exists('ot_register_meta_box')) {
        ot_register_meta_box($about_meta_box);
    }
    ot_register_meta_box($contact_meta_box);
    ot_register_meta_box($classes_meta_box);
    ot_register_meta_box($events_meta_box);
    ot_register_meta_box($slider_meta_box);
    ot_register_meta_box($event_meta_box);
    ot_register_meta_box($wishlist_meta_box);
    ot_register_meta_box($bridallist_meta_box);
    ot_register_meta_box($price_meta_box);
}
Пример #4
0
function _cb_meta()
{
    $cb_go = array('id' => 'cb_go', 'title' => 'Ness Post Options', 'desc' => '', 'pages' => array('post'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('id' => 'cb_featured_image_style_override', 'label' => 'Override Global Featured Image Style', 'desc' => 'Enable this to override "Theme Options -> Posts -> Global Featured Image Style Override" option.', 'std' => '', 'type' => 'select', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'choices' => array(array('value' => 'off', 'label' => '-', 'src' => ''), array('value' => 'on', 'label' => 'Override', 'src' => ''))), array('id' => 'cb_featured_image_style', 'label' => 'Featured Image Style', 'desc' => '', 'std' => 'full-background', 'type' => 'radio-image', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'choices' => array(array('value' => 'full-background', 'label' => 'Full-Background', 'src' => '/img_fs.png'), array('value' => 'parallax', 'label' => 'Parallax', 'src' => '/img_pa.png'), array('value' => 'background-slideshow', 'label' => 'Background Slideshow', 'src' => '/img_bs.png'), array('value' => 'off', 'label' => 'Off', 'src' => '/img_off.png'))), array('id' => 'cb_post_background_slideshow', 'label' => 'Background Slideshow Images', 'desc' => 'Upload/set images to show as a Slideshow', 'std' => '', 'type' => 'gallery', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => 'cb_featured_image_style:is(background-slideshow)', 'operator' => 'and')));
    ot_register_meta_box($cb_go);
    $cb_go_pages = array('id' => 'cb_go', 'title' => 'Ness Page Options', 'desc' => '', 'pages' => array('page'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('id' => 'cb_featured_image_style', 'label' => 'Featured Image Style', 'desc' => '', 'std' => 'full-background', 'type' => 'radio-image', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'choices' => array(array('value' => 'full-background', 'label' => 'Full-Background', 'src' => '/img_fs.png'), array('value' => 'parallax', 'label' => 'Parallax', 'src' => '/img_pa.png'), array('value' => 'background-slideshow', 'label' => 'Background Slideshow', 'src' => '/img_bs.png'), array('value' => 'off', 'label' => 'Off', 'src' => '/img_off.png'))), array('id' => 'cb_post_background_slideshow', 'label' => 'Background Slideshow Images', 'desc' => 'Upload/set images to show as a Slideshow', 'std' => '', 'type' => 'gallery', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => 'cb_featured_image_style:is(background-slideshow)', 'operator' => 'and'), array('id' => 'cb_page_comments', 'label' => 'Page Comments', 'desc' => 'If you enable comments, you may also need to click on "screen options" on the top right and check the "discussion" box and make sure "Allow Comments" is also enabled.', 'std' => 'off', 'type' => 'on-off', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and')));
    ot_register_meta_box($cb_go_pages);
}
Пример #5
0
 function _add_metabox()
 {
     $my_meta_box = array('id' => 'st_product_options', 'title' => __('Product Options', ST_TEXTDOMAIN), 'pages' => array('product'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('id' => 'set_new_product', 'label' => __('Set as new product', ST_TEXTDOMAIN), 'type' => 'on-off', 'std' => 'off')));
     if (function_exists('ot_register_meta_box')) {
         ot_register_meta_box($my_meta_box);
     }
 }
Пример #6
0
 private function clients()
 {
     if (function_exists('ot_register_meta_box')) {
         $my_meta_box = array('id' => 'coll_option_settings', 'title' => __('Settings', 'framework'), 'desc' => __('', 'framework'), 'pages' => array('coll-clients'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('id' => 'coll_link_url', 'label' => __('Client url', 'framework'), 'desc' => __('Insert the url the client\'s website', 'framework'), 'std' => '', 'type' => 'text', 'class' => '', 'choices' => array())));
         ot_register_meta_box($my_meta_box);
     }
 }
Пример #7
0
function hu_custom_meta_boxes()
{
    /*  Custom meta boxes
    /* ------------------------------------ */
    $page_options = array('id' => 'page-options', 'title' => 'Page Options', 'desc' => '', 'pages' => array('page'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('label' => 'Heading', 'id' => '_heading', 'type' => 'text'), array('label' => 'Subheading', 'id' => '_subheading', 'type' => 'text'), array('label' => sprintf('%1$s</br><i style="font-size:12px">%2$s</i>', __('Select a widget zone for the primary sidebar.', 'hueman'), __('Notes : 1)This will override any default settings of the customizer options panel. 2) The primary sidebar is placed on the left in a 3 columns layout. It can be on the right in a 2 columns layout, when the content is on the left.', 'hueman')), 'id' => '_sidebar_primary', 'type' => 'sidebar-select', 'desc' => ''), array('label' => sprintf('%1$s</br><i style="font-size:12px">%2$s</i>', __('Select a widget zone for the secondary sidebar.', 'hueman'), __('Notes : 1)This will override any default settings of the customizer options panel. 2) The secondary sidebar is placed on the right in a 3 columns layout.', 'hueman')), 'id' => '_sidebar_secondary', 'type' => 'sidebar-select', 'desc' => ''), array('label' => sprintf('%1$s</br><i style="font-size:12px">%2$s</i>', __('Select a layout for this page.', 'hueman'), __('This will override any default settings of the customizer options panel.', 'hueman')), 'id' => '_layout', 'type' => 'radio-image', 'desc' => '', 'std' => 'inherit', 'choices' => array(array('value' => 'inherit', 'label' => 'Inherit Layout', 'src' => get_template_directory_uri() . '/assets/admin/img/layout-off.png'), array('value' => 'col-1c', 'label' => '1 Column', 'src' => get_template_directory_uri() . '/assets/admin/img/col-1c.png'), array('value' => 'col-2cl', 'label' => '2 Column Left', 'src' => get_template_directory_uri() . '/assets/admin/img/col-2cl.png'), array('value' => 'col-2cr', 'label' => '2 Column Right', 'src' => get_template_directory_uri() . '/assets/admin/img/col-2cr.png'), array('value' => 'col-3cm', 'label' => '3 Column Middle', 'src' => get_template_directory_uri() . '/assets/admin/img/col-3cm.png'), array('value' => 'col-3cl', 'label' => '3 Column Left', 'src' => get_template_directory_uri() . '/assets/admin/img/col-3cl.png'), array('value' => 'col-3cr', 'label' => '3 Column Right', 'src' => get_template_directory_uri() . '/assets/admin/img/col-3cr.png')))));
    $post_options = array('id' => 'post-options', 'title' => 'Post Options', 'desc' => '', 'pages' => array('post'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('label' => sprintf('%1$s</br><i style="font-size:12px">%2$s</i>', __('Select a widget zone for the left sidebar.', 'hueman'), __('This will override any default settings of the customizer options panel.', 'hueman')), 'id' => '_sidebar_primary', 'type' => 'sidebar-select', 'desc' => ''), array('label' => sprintf('%1$s</br><i style="font-size:12px">%2$s</i>', __('Select a widget zone for the right sidebar.', 'hueman'), __('This will override any default settings of the customizer options panel.', 'hueman')), 'id' => '_sidebar_secondary', 'type' => 'sidebar-select', 'desc' => ''), array('label' => 'Layout', 'id' => '_layout', 'type' => 'radio-image', 'desc' => 'Overrides the default layout option', 'std' => 'inherit', 'choices' => array(array('value' => 'inherit', 'label' => 'Inherit Layout', 'src' => get_template_directory_uri() . '/assets/admin/img/layout-off.png'), array('value' => 'col-1c', 'label' => '1 Column', 'src' => get_template_directory_uri() . '/assets/admin/img/col-1c.png'), array('value' => 'col-2cl', 'label' => '2 Column Left', 'src' => get_template_directory_uri() . '/assets/admin/img/col-2cl.png'), array('value' => 'col-2cr', 'label' => '2 Column Right', 'src' => get_template_directory_uri() . '/assets/admin/img/col-2cr.png'), array('value' => 'col-3cm', 'label' => '3 Column Middle', 'src' => get_template_directory_uri() . '/assets/admin/img/col-3cm.png'), array('value' => 'col-3cl', 'label' => '3 Column Left', 'src' => get_template_directory_uri() . '/assets/admin/img/col-3cl.png'), array('value' => 'col-3cr', 'label' => '3 Column Right', 'src' => get_template_directory_uri() . '/assets/admin/img/col-3cr.png')))));
    //post format are @fromfull => keep it in hueman on wp.org
    $post_format_audio = array('id' => 'format-audio', 'title' => 'Format: Audio', 'desc' => 'These settings enable you to embed audio into your posts. You must provide both .mp3 and .ogg/.oga file formats in order for self hosted audio to function accross all browsers.', 'pages' => array('post'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('label' => 'MP3 File URL', 'id' => '_audio_mp3_url', 'type' => 'upload', 'desc' => 'The URL to the .mp3 or .m4a audio file'), array('label' => 'OGA File URL', 'id' => '_audio_ogg_url', 'type' => 'upload', 'desc' => 'The URL to the .oga, .ogg audio file')));
    $post_format_gallery = array('id' => 'format-gallery', 'title' => 'Format: Gallery', 'desc' => '<a title="Add Media" data-editor="content" class="button insert-media add_media" id="insert-media-button" href="#">Add Media</a> <br /><br />
            To create a gallery, upload your images and then select "<strong>Uploaded to this post</strong>" from the dropdown (in the media popup) to see images attached to this post. You can drag to re-order or delete them there. <br /><br /><i>Note: Do not click the "Insert into post" button. Only use the "Insert Media" section of the upload popup, not "Create Gallery" which is for standard post galleries.</i>', 'pages' => array('post'), 'context' => 'normal', 'priority' => 'high', 'fields' => array());
    $post_format_chat = array('id' => 'format-chat', 'title' => 'Format: Chat', 'desc' => 'Input chat dialogue.', 'pages' => array('post'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('label' => 'Chat Text', 'id' => '_chat', 'type' => 'textarea', 'rows' => '2')));
    $post_format_link = array('id' => 'format-link', 'title' => 'Format: Link', 'desc' => 'Input your link.', 'pages' => array('post'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('label' => 'Link Title', 'id' => '_link_title', 'type' => 'text'), array('label' => 'Link URL', 'id' => '_link_url', 'type' => 'text')));
    $post_format_quote = array('id' => 'format-quote', 'title' => 'Format: Quote', 'desc' => 'Input your quote.', 'pages' => array('post'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('label' => 'Quote', 'id' => '_quote', 'type' => 'textarea', 'rows' => '2'), array('label' => 'Quote Author', 'id' => '_quote_author', 'type' => 'text')));
    $post_format_video = array('id' => 'format-video', 'title' => 'Format: Video', 'desc' => 'These settings enable you to embed videos into your posts.', 'pages' => array('post'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('label' => 'Video URL', 'id' => '_video_url', 'type' => 'text', 'desc' => '')));
    /*  Register meta boxes
    /* ------------------------------------ */
    ot_register_meta_box($page_options);
    ot_register_meta_box($post_format_audio);
    ot_register_meta_box($post_format_chat);
    ot_register_meta_box($post_format_gallery);
    ot_register_meta_box($post_format_link);
    ot_register_meta_box($post_format_quote);
    ot_register_meta_box($post_format_video);
    ot_register_meta_box($post_options);
}
Пример #8
0
 public function Members_meta()
 {
     $Members_meta = array('id' => 'Members_section', 'title' => __('Home Page Additional Information', 'SimThemes'), 'desc' => '', 'pages' => array('members'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('id' => 'clinet_image', 'label' => __('Client Image', 'SimThemes'), 'desc' => sprintf(__('image size must be 103px 126px', 'SimThemes')), 'std' => '', 'type' => 'upload', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => ''), array('id' => 'designation_m', 'label' => __('Designation', 'SimThemes'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'operator' => 'and'), array('id' => 'email_m', 'label' => __('Email', 'SimThemes'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'operator' => 'and'), array('id' => 'twitter', 'label' => __('Twitter URL', 'SimThemes'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'operator' => 'and'), array('id' => 'facebook', 'label' => __('Facebook URL', 'SimThemes'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'operator' => 'and'), array('id' => 'linkedin', 'label' => __('LinkedIn URL', 'SimThemes'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'operator' => 'and')));
     if (function_exists('ot_register_meta_box')) {
         ot_register_meta_box($Members_meta);
     }
 }
Пример #9
0
/**
 * Meta Boxes demo code.
 *
 * You can find all the available option types
 * in demo-theme-options.php.
 *
 * @return    void
 *
 * @access    private
 * @since     2.0
 */
function _custom_meta_boxes()
{
    /**
     * Create a custom meta boxes array that we pass to 
     * the OptionTree Meta Box API Class.
     */
    $post_meta_box_video = array('id' => 'post_meta_video', 'title' => 'Video Settings', 'pages' => array('post'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('label' => 'Video URL', 'id' => 'post_video', 'type' => 'textarea-simple', 'desc' => 'Video URL. You can find a list of websites you can embed here: <a href="http://codex.wordpress.org/Embeds">Wordpress Embeds</a>', 'std' => '', 'rows' => '5'), array('label' => 'Is this a Vimeo video?', 'id' => 'post_video_vimeo', 'desc' => 'This adjustes the widescreen height so that vimeo vidoes are displayed correctly.', 'std' => '', 'type' => 'checkbox', 'choices' => array(array('value' => 'vimeo', 'label' => 'This is a Vimeo video. ')))));
    $post_meta_box_quote = array('id' => 'post_meta_quote', 'title' => 'Quote Settings', 'pages' => array('post'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('label' => 'Quote', 'id' => 'post_quote', 'type' => 'textarea-simple', 'desc' => 'Quote Text. Works only if this is a quote post.', 'std' => '', 'rows' => '3'), array('label' => 'Quote Author', 'id' => 'post_quote_author', 'type' => 'text', 'desc' => 'Author of the Quote', 'std' => '', 'rows' => '1'), array('label' => 'Quote Author Avatar', 'id' => 'post_quote_avatar', 'type' => 'upload', 'desc' => 'Photo of the quote author', 'std' => '', 'rows' => '1')));
    $post_meta_box_link = array('id' => 'post_meta_link', 'title' => 'Link Settings', 'pages' => array('post'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('label' => 'Link URL', 'id' => 'post_link_url', 'type' => 'text', 'desc' => 'Link URL. Works only if this is a link post.', 'std' => '', 'rows' => '1')));
    $post_meta_box_audio = array('id' => 'post_meta_audio', 'title' => 'Audio Settings', 'pages' => array('post'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('label' => 'MP3 File URL', 'id' => 'post_audio_mp3', 'type' => 'upload', 'desc' => 'The URL to the .mp3 audio file', 'std' => '', 'rows' => '1'), array('label' => 'Song title', 'id' => 'post_audio_title', 'type' => 'text', 'desc' => 'Title of the song to be displayed on the player', 'std' => '', 'rows' => '1')));
    $post_meta_box_sidebar_gallery = array('id' => 'meta_box_sidebar_gallery', 'title' => 'Gallery', 'pages' => array('post'), 'context' => 'side', 'priority' => 'low', 'fields' => array(array('id' => 'pp_gallery_slider', 'type' => 'gallery', 'desc' => '', 'post_type' => 'post')));
    $product_meta_box = array('id' => 'product_settings', 'title' => 'Product Page Settings', 'pages' => array('product'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('id' => 'tab0', 'label' => 'Product Images', 'type' => 'tab'), array('label' => 'Use Boxed Product Images?', 'id' => 'boxed_product_image', 'type' => 'on_off', 'desc' => 'If you enable boxed product images, your images will not go under the header and footer.', 'std' => 'off'), array('label' => 'Enable Thumbnails', 'id' => 'thumbnail_product_image', 'type' => 'on_off', 'desc' => 'If you enable thumbnails, thumbnails would be visible over the slider.', 'std' => 'off'), array('id' => 'tab1', 'label' => 'Extended Page', 'type' => 'tab'), array('label' => 'Enable Extended Product Pages', 'id' => 'extended_product_page', 'type' => 'on_off', 'desc' => 'If you enable extended product pages, the editor will be displayed under the products, and the short description will be used for the description tab.', 'std' => 'off'), array('id' => 'tab2', 'label' => 'Sizing Guide', 'type' => 'tab'), array('label' => 'Enable Sizing Guide', 'id' => 'sizing_guide', 'type' => 'on_off', 'desc' => 'Enabling the sizing guide will add a link to the product page that will open the below content in a lightbox.', 'std' => 'off'), array('label' => 'Sizing Guide Text', 'id' => 'sizing_guide_text', 'type' => 'text', 'desc' => 'You can override the sizing guide text here', 'rows' => '1', 'condition' => 'sizing_guide:is(on)'), array('label' => 'Sizing Guide Content', 'id' => 'sizing_guide_content', 'type' => 'textarea', 'desc' => 'You can insert your sizin guide content here. Preferablly an image.', 'std' => '', 'rows' => '5', 'condition' => 'sizing_guide:is(on)')));
    $page_metabox = array('id' => 'post_metaboxes_combined', 'title' => 'Page Settings', 'pages' => array('page'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('id' => 'tab2', 'label' => 'Page Settings', 'type' => 'tab'), array('label' => 'Enable Page Padding', 'id' => 'page_padding', 'type' => 'on_off', 'desc' => 'This adds padding to the top & bottom of the page so the footer and header does not overlap with content', 'std' => 'off'), array('label' => 'Enable Full Width Page', 'id' => 'page_fullwidth', 'type' => 'on_off', 'desc' => 'This makes the page full-width. <small>You can always have full-width rows inside the grid using VC row settings</small>', 'std' => 'off'), array('id' => 'tab9', 'label' => 'Page Sidebar', 'type' => 'tab'), array('id' => 'sidebar_set', 'label' => 'Sidebar', 'type' => 'sidebar_select', 'desc' => 'Select a sidebar to display inside the page. <small>Blog pages automatically display the Blog sidebar</small>'), array('label' => 'Sidebar Position', 'id' => 'sidebar_position', 'type' => 'radio', 'desc' => 'Select where the sidebar should be positioned', 'choices' => array(array('label' => 'Left', 'value' => 'left'), array('label' => 'Right', 'value' => 'right')), 'std' => 'no', 'condition' => 'sidebar_set:not()'), array('id' => 'tab0', 'label' => 'Header Override', 'type' => 'tab'), array('label' => 'Override Global Header?', 'id' => 'header_override', 'type' => 'on_off', 'desc' => 'You can override global header styles here', 'std' => 'off'), array('label' => 'Header shopping cart', 'id' => 'header_cart', 'type' => 'on_off', 'desc' => 'Would you like to display the shopping cart inside the header?', 'std' => 'on', 'condition' => 'header_override:is(on)'), array('label' => 'Display Light or Dark Menu?', 'id' => 'header_menu_color', 'type' => 'radio', 'desc' => 'What color would you like to display for the menu?', 'choices' => array(array('label' => 'Light Menu', 'value' => 'dark'), array('label' => 'Dark Menu', 'value' => 'light')), 'std' => 'dark', 'condition' => 'header_override:is(on)'), array('id' => 'tab4', 'label' => 'Revolution Slider', 'type' => 'tab'), array('label' => 'Revolution Slider Alias', 'id' => 'rev_slider_alias', 'type' => 'revslider-select', 'desc' => 'If you would like to display Revolution Slider on top of this page, please enter the slider alias', 'std' => '', 'rows' => '1'), array('id' => 'tab5', 'label' => 'Navigation', 'type' => 'tab'), array('label' => 'Select Page Primary Menu', 'id' => 'page_menu', 'type' => 'menu_select', 'desc' => 'If you select a menu here, it will override the main navigation menu.'), array('label' => 'Enable One-Page-Scroll Navigation?', 'id' => 'page_scroll', 'desc' => 'This enables the one page scroll navigation. When clicked on navigation elements, the page will scroll.', 'std' => 'off', 'type' => 'on_off'), array('id' => 'tab6', 'label' => 'Snap To Scroll', 'type' => 'tab'), array('label' => 'Enable Snap To Scroll Effect?', 'id' => 'snap_scroll', 'desc' => 'This enables the one page snap to scroll feature. When you scroll, the screen will snap to sections', 'std' => 'off', 'type' => 'on_off'), array('id' => 'tab7', 'label' => 'Look Book', 'type' => 'tab'), array('id' => 'lookbook_text', 'label' => 'About the Look Book Settings', 'desc' => 'These settings will only work if you have selected the Look Book template for this page.', 'std' => '', 'type' => 'textblock'), array('label' => 'Content Background', 'id' => 'look_book_bg', 'type' => 'background', 'desc' => 'Background settings for look book content on the left.'), array('label' => 'Look Book Items', 'id' => 'look_book', 'type' => 'list-item', 'desc' => 'You can add Look Book Items here', 'settings' => array(array('label' => 'Look Image', 'id' => 'look_image', 'type' => 'upload', 'desc' => 'You can upload your Look Image here.'), array('label' => 'Product IDs', 'id' => 'look_product_ids', 'type' => 'text', 'desc' => 'Product IDs associated with this look.', 'rows' => '1')))));
    /**
     * Register our meta boxes using the 
     * ot_register_meta_box() function.
     */
    ot_register_meta_box($post_meta_box_video);
    ot_register_meta_box($post_meta_box_quote);
    ot_register_meta_box($post_meta_box_link);
    ot_register_meta_box($post_meta_box_audio);
    ot_register_meta_box($post_meta_box_sidebar_gallery);
    ot_register_meta_box($page_metabox);
    ot_register_meta_box($product_meta_box);
}
Пример #10
0
 public function Testimonials_meta()
 {
     $Testimonials_meta = array('id' => 'testimonials_section', 'title' => __('Home Page Additional Information', 'SimThemes'), 'desc' => '', 'pages' => array('testimonial'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('id' => 'clinet_image', 'label' => __('Client Image', 'SimThemes'), 'desc' => sprintf(__('image size must be 103px 126px', 'SimThemes')), 'std' => '', 'type' => 'upload', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => ''), array('id' => 'client_Email', 'label' => __('Clint Email', 'SimThemes'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'operator' => 'and'), array('id' => 'client_Designation', 'label' => __('Clint Designation', 'SimThemes'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'operator' => 'and')));
     if (function_exists('ot_register_meta_box')) {
         ot_register_meta_box($Testimonials_meta);
     }
 }
Пример #11
0
 static function init()
 {
     self::$metabox = array('id' => 'general_post', 'title' => 'General post settings', 'pages' => array('post'), 'context' => 'normal', 'priority' => 'high', 'class' => 'dynamic-meta', 'fields' => array(array('label' => 'Slider gallery', 'id' => 'bw_gallery', 'type' => 'bw_gallery', 'class' => 'post-format-gallery'), array('label' => 'Slider options', 'id' => 'auto_height', 'type' => 'checkbox', 'choices' => array(array('label' => 'Auto-height: check this so you can use diffrent heights on each slide. Don\'t use it on large content websites', 'value' => '1')), 'desc' => '', 'class' => 'post-format-gallery'), array('label' => '', 'id' => 'auto_play', 'type' => 'checkbox', 'choices' => array(array('label' => 'Auto-play: check this if you want your slider to play automatically', 'value' => '1')), 'desc' => '', 'class' => 'post-format-gallery'), array('label' => '', 'id' => 'hide_nav', 'type' => 'checkbox', 'choices' => array(array('label' => 'Hide navigation: this option will hide the previous and next button of the slider', 'value' => '1')), 'desc' => '', 'class' => 'post-format-gallery'), array('label' => 'Slider effect', 'id' => 'slider_effect', 'type' => 'select', 'choices' => array(array('label' => 'slide', 'value' => false), array('label' => 'fade', 'value' => 'fade'), array('label' => 'backSlide', 'value' => 'backSlide'), array('label' => 'goDown', 'value' => 'goDown'), array('label' => 'fadeUp', 'value' => 'fadeUp')), 'desc' => '', 'class' => 'post-format-gallery'), array('label' => 'Embed code', 'id' => 'embed_code', 'type' => 'textarea_simple', 'desc' => '', 'class' => 'post-format-video'), array('label' => 'Auto-height video', 'id' => 'embed_height', 'type' => 'checkbox', 'choices' => array(array('label' => 'Check if you want your embed code to be dipsplayed in 16:9 aspect', 'value' => '1')), 'desc' => '', 'class' => 'post-format-video')));
     ot_register_meta_box(self::$metabox);
     $settings = array('id' => 'settings_post', 'title' => 'Post settings', 'pages' => array('post'), 'context' => 'side', 'priority' => 'high', 'class' => '', 'fields' => array(array('label' => 'Featured post', 'id' => 'bw_featured_post', 'type' => 'bw_on_off', 'choices' => array(array('label' => '', 'value' => '1')), 'desc' => ''), array('label' => 'Enable category slider', 'id' => 'bw_category_slider', 'type' => 'bw_on_off', 'choices' => array(array('label' => '', 'value' => '1')), 'desc' => ''), array('label' => 'Full width featured image / video', 'id' => 'bw_full_width_featured', 'type' => 'bw_on_off', 'choices' => array(array('label' => '', 'value' => '1')), 'desc' => ''), array('label' => 'Page layout', 'id' => 'page_layout', 'type' => 'radio_image', 'desc' => '', 'choices' => array(array('label' => 'No', 'value' => 'full', 'src' => BW_URI_FRAME_ASSETS . 'img/admin/layouts_small/full.png'), array('label' => 'Yes', 'value' => 'right', 'src' => BW_URI_FRAME_ASSETS . 'img/admin/layouts_small/right.png')))));
     ot_register_meta_box($settings);
 }
Пример #12
0
/**
 * Meta Boxes demo code.
 *
 * You can find all the available option types
 * in demo-theme-options.php.
 *
 * @return    void
 *
 * @access    private
 * @since     2.0
 */
function _custom_meta_boxes()
{
    /**
     * Create a custom meta boxes array that we pass to 
     * the OptionTree Meta Box API Class.
     */
    $post_meta_box_gallery = array('id' => 'post_meta_gallery', 'title' => 'Gallery Type', 'pages' => array('post'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('label' => 'How would you like to display your gallery?', 'id' => 'gallery-type', 'type' => 'radio', 'desc' => 'We suggest using 8 images for Thumbnail type.', 'choices' => array(array('label' => 'Slider', 'value' => 'slider'), array('label' => 'Thumbnails', 'value' => 'thumbnails')), 'std' => 'no')));
    $post_meta_box_video = array('id' => 'post_meta_video', 'title' => 'Video Settings', 'pages' => array('post'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('label' => 'Video URL', 'id' => 'post_video', 'type' => 'textarea-simple', 'desc' => 'Video URL. You can find a list of websites you can embed here: <a href="http://codex.wordpress.org/Embeds">Wordpress Embeds</a>', 'std' => '', 'rows' => '5'), array('label' => 'Is this a Vimeo video?', 'id' => 'post_video_vimeo', 'desc' => 'This adjustes the widescreen height so that vimeo vidoes are displayed correctly.', 'std' => '', 'type' => 'checkbox', 'choices' => array(array('value' => 'vimeo', 'label' => 'This is a Vimeo video. ')))));
    $post_meta_box_quote = array('id' => 'post_meta_quote', 'title' => 'Quote Settings', 'pages' => array('post'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('label' => 'Quote', 'id' => 'post_quote', 'type' => 'textarea-simple', 'desc' => 'Quote Text. Works only if this is a quote post.', 'std' => '', 'rows' => '3'), array('label' => 'Quote Author', 'id' => 'post_quote_author', 'type' => 'text', 'desc' => 'Author of the quote', 'std' => '', 'rows' => '1')));
    $post_meta_box_link = array('id' => 'post_meta_link', 'title' => 'Link Settings', 'pages' => array('post'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('label' => 'Link Text', 'id' => 'post_link_text', 'type' => 'text', 'desc' => 'Link Text. Works only if this is a link post.', 'std' => '', 'rows' => '1'), array('label' => 'Link URL', 'id' => 'post_link_url', 'type' => 'text', 'desc' => 'Link URL. Works only if this is a link post.', 'std' => '', 'rows' => '1')));
    $post_meta_box_audio = array('id' => 'post_meta_audio', 'title' => 'Audio Settings', 'pages' => array('post'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('label' => 'MP3 File URL', 'id' => 'post_audio_mp3', 'type' => 'upload', 'desc' => 'The URL to the .mp3 audio file', 'std' => '', 'rows' => '1')));
    $revslider_metabox = array('id' => 'post_meta_revslider', 'title' => 'Revolution Slider Setting', 'pages' => array('page'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('label' => 'Revolution Slider Alias', 'id' => 'rev_slider_alias', 'type' => 'revslider-select', 'desc' => 'If you would like to display Revolution Slider on top of this page, please enter the slider alias', 'std' => '', 'rows' => '1')));
    $page_meta_box_settings = array('id' => 'page_settings', 'title' => 'Page Settings', 'pages' => array('page'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('label' => 'Display Title & Breadcrumbs?', 'id' => 'display_breadcrumbs', 'type' => 'on_off', 'desc' => 'You can toggle the breadcrumbs on/off using this.', 'std' => 'on', 'section' => 'misc'), array('id' => 'sidebar_set', 'label' => 'Sidebar', 'type' => 'sidebar_select', 'desc' => 'Select a sidebar to display inside the page. <small>Blog pages automatically display the Blog sidebar</small>'), array('label' => 'Sidebar Position', 'id' => 'sidebar_position', 'type' => 'radio', 'desc' => 'Select where the sidebar should be positioned', 'choices' => array(array('label' => 'Left', 'value' => 'left'), array('label' => 'Right', 'value' => 'right')), 'std' => 'no', 'condition' => 'sidebar_set:not()')));
    $product_meta_box_settings = array('id' => 'product_settings', 'title' => 'Product Page Settings', 'pages' => array('product'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('label' => 'Enable Extended Product Pages', 'id' => 'extended_product_page', 'type' => 'on_off', 'desc' => 'If you enable extended product pages, the editor will be displayed under the products, and the short description will be used for the description tab.', 'std' => 'off'), array('label' => 'Related Posts', 'id' => 'related_products', 'type' => 'on_off', 'desc' => 'You can disable related products from here', 'std' => 'on'), array('label' => 'Enable Product Zoom', 'id' => 'product_zoom', 'type' => 'on_off', 'desc' => 'You can enable product zoom here. Make sure your original images are at least 2x the size of the displayed image. <small>This will disable the lightbox feature</small>', 'std' => 'off')));
    $page_meta_box_portfolio = array('id' => 'page_portfolio_settings', 'title' => 'Portfolio Page Settings', 'pages' => array('page'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('label' => 'Portfolio Columns', 'id' => 'portfolio_columns', 'type' => 'radio-image', 'desc' => 'If this is a portfolio page, you can change the number of columns here. <br><small>Only works if you select the Portfolio template</small>', 'std' => 'three'), array('label' => 'Portfolio Categories', 'id' => 'portfolio_categories', 'type' => 'taxonomy-checkbox', 'desc' => 'If this is a portfolio page, which portfolio categories would you like to display?<small>Select at least one</small>', 'taxonomy' => 'project-category'), array('label' => 'Portfolio Items per Page', 'id' => 'portfolio_pagecount', 'type' => 'text', 'desc' => 'If this is a paginated portfolio, how man items would you like to show per page? <small>Enter -1 for unlimited</small>', 'rows' => '1', 'std' => '-1')));
    $portfolio_meta_box = array('id' => 'portfolio_settings', 'title' => 'Portfolio Settings', 'pages' => array('portfolio'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('id' => 'portfolio_layout', 'label' => 'Portfolio Layout', 'type' => 'radio', 'desc' => 'You can select between different layouts for the portfolio item.', 'choices' => array(array('label' => 'Layout 1', 'value' => 'layout1'), array('label' => 'Layout 2', 'value' => 'layout2')), 'std' => 'layout1'), array('label' => 'Main Portfolio Page', 'id' => 'portfolio_main', 'type' => 'portfolio-select', 'desc' => 'Main Portfolio Page for this portfolio item. This is useful if you have multiple portfolios and have different child portfolio items.'), array('id' => 'portfolio_type', 'label' => 'Portfolio Type', 'type' => 'radio', 'desc' => 'What type of portfolio item is this? Always upload an image and set it as the featured image even if its a video portfolio.', 'choices' => array(array('label' => 'Standard', 'value' => 'standard'), array('label' => 'Image', 'value' => 'image'), array('label' => 'Gallery', 'value' => 'gallery'), array('label' => 'Video', 'value' => 'video'), array('label' => 'Link', 'value' => 'link')), 'std' => 'standard'), array('label' => 'Revolution Slider Alias', 'id' => 'rev_slider_alias', 'type' => 'revslider-select', 'desc' => 'If you would like, you can display a revolution slider rather than a slider.', 'std' => '', 'rows' => '1', 'condition' => 'portfolio_type:is(gallery)'), array('label' => 'Video URL', 'id' => 'portfolio_video', 'type' => 'textarea-simple', 'desc' => 'Video URL. Works only if this is a video portfolio item.', 'std' => '', 'rows' => '1', 'condition' => 'portfolio_type:is(video)'), array('label' => 'Is this a Vimeo video?', 'id' => 'portfolio_video_vimeo', 'desc' => 'This adjustes the widescreen height so that vimeo vidoes are displayed correctly.', 'std' => '', 'type' => 'checkbox', 'condition' => 'portfolio_type:is(video)', 'choices' => array(array('value' => 'vimeo', 'label' => 'This is a Vimeo video. '))), array('label' => 'Link', 'id' => 'portfolio_link', 'type' => 'text', 'desc' => 'Link to the live project if this is a Link type portfolio', 'rows' => '1', 'condition' => 'portfolio_type:is(link)'), array('label' => 'Portfolio Attributes', 'id' => 'portfolio_attributes', 'type' => 'list-item', 'desc' => 'Please add attributes for this portfolio. Ex: Client name, Client URL, etc.', 'settings' => array(array('label' => 'Value', 'id' => 'attribute_value', 'type' => 'text', 'desc' => 'Value of this attribute', 'rows' => '1')))));
    $post_meta_box_sidebar_gallery = array('id' => 'meta_box_sidebar_gallery', 'title' => 'Gallery', 'pages' => array('post', 'portfolio'), 'context' => 'side', 'priority' => 'low', 'fields' => array(array('id' => 'pp_gallery_slider', 'type' => 'gallery', 'desc' => '', 'post_type' => 'post')));
    /**
     * Register our meta boxes using the 
     * ot_register_meta_box() function.
     */
    ot_register_meta_box($post_meta_box_video);
    ot_register_meta_box($post_meta_box_gallery);
    ot_register_meta_box($post_meta_box_quote);
    ot_register_meta_box($post_meta_box_link);
    ot_register_meta_box($post_meta_box_audio);
    ot_register_meta_box($post_meta_box_sidebar_gallery);
    ot_register_meta_box($revslider_metabox);
    ot_register_meta_box($product_meta_box_settings);
    ot_register_meta_box($page_meta_box_settings);
    ot_register_meta_box($page_meta_box_portfolio);
    ot_register_meta_box($portfolio_meta_box);
}
Пример #13
0
 public function Services_meta()
 {
     $Services_meta = array('id' => 'Services_section', 'title' => __('Home Page Additional Information', 'SimThemes'), 'desc' => '', 'pages' => array('Service'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('id' => 'service_icon', 'label' => __('Service Icon', 'SimThemes'), 'desc' => sprintf(__('Please select the icon', 'SimThemes')), 'std' => '', 'type' => 'font-awesome', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => ''), array('id' => 'client_Email', 'label' => __('Clint Email', 'SimThemes'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'operator' => 'and'), array('id' => 'client_Designation', 'label' => __('Clint Designation', 'SimThemes'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'operator' => 'and')));
     if (function_exists('ot_register_meta_box')) {
         ot_register_meta_box($Services_meta);
     }
 }
Пример #14
0
 /**
  * Initialize the pattern settings meta box.
  *
  * @since    0.0.1
  */
 function add_pattern_meta_box()
 {
     $settings = get_option('wpcb_global_settings');
     $primary_craft = $settings['wpcb-primary-craft'] ? $settings['wpcb-primary-craft'] : 'knitting';
     $pattern_meta_box = array('id' => 'wpcb_pattern_metabox', 'title' => __('Pattern Details', 'wp-craft-blogger'), 'desc' => '', 'pages' => array('pattern'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('id' => 'wpcb-pattern-general_tab', 'label' => __('General', 'wp-craft-blogger'), 'type' => 'tab'), array('id' => 'wpcb-pattern-craft', 'label' => __('Craft', 'wp-craft-blogger'), 'desc' => __('If project uses multiple crafts, choose the main one.', 'wp-craft-blogger'), 'std' => $primary_craft, 'type' => 'select', 'choices' => array(array('label' => __('Crochet', 'wp-craft-blogger'), 'value' => 'crochet'), array('label' => __('Knitting', 'wp-craft-blogger'), 'value' => 'knitting'))), array('id' => 'wpcb-pattern-title', 'label' => __('Pattern Name', 'wp-craft-blogger'), 'desc' => __('Leave blank to use post title', 'wp-craft-blogger'), 'type' => 'text'), array('id' => 'wpcb-pattern-rav_url', 'label' => __('Ravelry URL', 'wp-craft-blogger'), 'desc' => __('If this pattern is available on Ravelry, enter the pattern URL here.', 'wp-craft-blogger'), 'type' => 'text'), array('id' => 'wpcb-pattern-gauge', 'label' => __('Gauge', 'wp-craft-blogger'), 'desc' => 'e.g. "20sts over 4in in stockinette".', 'type' => 'text'), array('id' => 'wpcb-pattern-supplies_tab', 'label' => __('Supplies', 'wp-craft-blogger'), 'type' => 'tab'), array('id' => 'wpcb-pattern-yarns', 'label' => __('Yarn(s)', 'wp-craft-blogger'), 'desc' => __('The yarn or yarns required to complete this pattern.', 'wp-craft-blogger'), 'type' => 'list-item', 'settings' => array(array('id' => 'yardage', 'label' => __('Yardage', 'wp-craft-blogger'), 'type' => 'text'), array('id' => 'colorway', 'label' => __('Colorway', 'wp-craft-blogger'), 'type' => 'text'))), array('id' => 'wpcb-pattern-tools', 'label' => __('Needles / Hooks', 'wp-craft-blogger'), 'desc' => __('The hook / needle size(s) required to complete this pattern.', 'wp-craft-blogger'), 'type' => 'list-item', 'settings' => array(array('id' => 'notes', 'label' => __('Notes', 'wp-craft-blogger'), 'desc' => __('e.g. pattern is written for one circular needle, but substitute as preferred.', 'wp-craft-blogger'), 'type' => 'textarea', 'rows' => 2))), array('id' => 'wpcb-pattern-notions', 'label' => __('Other notions', 'wp-craft-blogger'), 'desc' => __('Any extra bits and pieces', 'wp-craft-blogger'), 'type' => 'list-item', 'settings' => array(array('id' => 'amount', 'label' => __('Amount', 'wp-craft-blogger'), 'desc' => __('e.g. "3" buttons, "5yds" ribbon', 'wp-craft-blogger'), 'type' => 'text'), array('id' => 'notes', 'label' => __('Notes', 'wp-craft-blogger'), 'desc' => __('Any special notes about this notion.', 'wp-craft-blogger'), 'type' => 'textarea', 'rows' => 2))), array('id' => 'wpcb-pattern-instructions_tab', 'label' => __('Instructions', 'wp-craft-blogger'), 'type' => 'tab'), array('id' => 'wpcb-pattern-key', 'label' => __('Key', 'wp-craft-blogger'), 'desc' => __('List abbreviations used in the pattern and their meaning.', 'wp-craft-blogger'), 'type' => 'textarea', 'rows' => 4), array('id' => 'wpcb-pattern-notes', 'label' => __('Pattern Notes', 'wp-craft-blogger'), 'desc' => __('Any extra notes or special instructions, e.g. "Please be sure to read the pattern thoroughly as some instructions are carried out at the same time".', 'wp-craft-blogger'), 'type' => 'textarea', 'rows' => 4), array('id' => 'wpcb-pattern-instructions', 'label' => __('Instructions', 'wp-craft-blogger'), 'desc' => __('Add as many instructions as required, you can also upload an image to each instruction.', 'wp-craft-blogger'), 'type' => 'list-item', 'settings' => array(array('id' => 'instruction_text', 'label' => __('Instruction text', 'wp-craft-blogger'), 'type' => 'textarea', 'rows' => '10'), array('id' => 'instruction_image', 'label' => __('Instruction image', 'wp-craft-blogger'), 'type' => 'upload')))));
     ot_register_meta_box($pattern_meta_box);
 }
Пример #15
0
function carolina_meta_boxes()
{
    $carolina_home_meta_box = array('id' => 'home_meta_box', 'title' => esc_html__('Home Page Options', 'carolina'), 'desc' => '', 'pages' => array('page'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('label' => esc_html__('Heading', 'carolina'), 'id' => 'featured_recipe', 'type' => 'tab'), array('id' => 'site_carolina_home_title', 'label' => esc_html__('Enter the title of the Page', 'carolina'), 'type' => 'text'), array('id' => 'site_carolina_home_description', 'label' => esc_html__('Enter the description of the Page', 'carolina'), 'type' => 'textarea-simple'), array('label' => esc_html__('Slider Section', 'carolina'), 'id' => 'slider_section', 'type' => 'tab'), array('id' => 'site_home_slider_categories', 'label' => esc_html__('Select the categories of the posts to be displayed in the slider', 'carolina'), 'desc' => '', 'std' => '', 'type' => 'category-select', 'class' => ''), array('id' => 'site_home_slider_no', 'label' => esc_html__('Select the number of images to be displayed in the slider', 'carolina'), 'desc' => '', 'std' => '3', 'type' => 'select', 'class' => '', 'choices' => array(array('label' => esc_html__('1', 'carolina'), 'value' => '1'), array('label' => esc_html__('2', 'carolina'), 'value' => '2'), array('label' => esc_html__('3', 'carolina'), 'value' => '3'), array('label' => esc_html__('4', 'carolina'), 'value' => '4'), array('label' => esc_html__('5', 'carolina'), 'value' => '5'), array('label' => esc_html__('6', 'carolina'), 'value' => '6'), array('label' => esc_html__('7', 'carolina'), 'value' => '7'), array('label' => esc_html__('8', 'carolina'), 'value' => '8'), array('label' => esc_html__('9', 'carolina'), 'value' => '9'), array('label' => esc_html__('10', 'danfe'), 'value' => '10'))), array('label' => esc_html__('Featured Recipe', 'carolina'), 'id' => 'home_featured_recipe', 'type' => 'tab'), array('id' => 'home_featured_recipe_post_no', 'label' => esc_html__('Select the number of featured recipe to display', 'carolina'), 'desc' => '', 'std' => '6', 'type' => 'select', 'class' => '', 'choices' => array(array('label' => esc_html__('1', 'carolina'), 'value' => '1'), array('label' => esc_html__('2', 'carolina'), 'value' => '2'), array('label' => esc_html__('3', 'carolina'), 'value' => '3'), array('label' => esc_html__('4', 'carolina'), 'value' => '4'), array('label' => esc_html__('5', 'carolina'), 'value' => '5'), array('label' => esc_html__('6', 'carolina'), 'value' => '6'))), array('label' => esc_html__('Post', 'carolina'), 'id' => 'home_post', 'type' => 'tab'), array('id' => 'home_post_no', 'label' => esc_html__('Select the number of posts to display', 'carolina'), 'desc' => '', 'std' => '6', 'type' => 'select', 'class' => '', 'choices' => array(array('label' => esc_html__('All', 'carolina'), 'value' => '-1'), array('label' => esc_html__('1', 'carolina'), 'value' => '1'), array('label' => esc_html__('2', 'carolina'), 'value' => '2'), array('label' => esc_html__('3', 'carolina'), 'value' => '3'), array('label' => esc_html__('4', 'carolina'), 'value' => '4'), array('label' => esc_html__('5', 'carolina'), 'value' => '5'), array('label' => esc_html__('6', 'carolina'), 'value' => '6')))));
    $carolina_about_meta_box = array('id' => 'blog_meta_box', 'title' => esc_html__('Options', 'carolina'), 'desc' => '', 'pages' => array('page'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('label' => esc_html__('Title', 'carolina'), 'id' => 'carolina_about_display', 'type' => 'tab'), array('id' => 'site_carolina_about_title', 'label' => esc_html__('Short Title', 'carolina'), 'type' => 'text'), array('id' => 'site_carolina_about_description', 'label' => esc_html__('Short Description', 'carolina'), 'type' => 'textarea-simple'), array('id' => 'site_carolina_about_content_title', 'label' => esc_html__('Heading', 'carolina'), 'type' => 'text'), array('id' => 'site_carolina_about_first_section', 'label' => esc_html__('First Section', 'carolina'), 'type' => 'tab'), array('id' => 'site_carolina_about_content_first_section', 'label' => esc_html__('Content', 'carolina'), 'type' => 'Textarea'), array('id' => 'site_carolina_about_second_section', 'label' => esc_html__('Second Section', 'carolina'), 'type' => 'tab'), array('id' => 'site_carolina_about_content_second_section', 'label' => esc_html__('Content', 'carolina'), 'type' => 'list-item', 'settings' => array(array('id' => 'second_section_icons', 'label' => esc_html__('Icons', 'carolina'), 'type' => 'upload'), array('id' => 'second_section_description', 'label' => esc_html__('Short description', 'carolina'), 'type' => 'Textarea'))), array('id' => 'site_carolina_about_third_section', 'label' => esc_html__('Third Section', 'carolina'), 'type' => 'tab'), array('id' => 'site_carolina_about_content_third_section', 'label' => esc_html__('Content', 'carolina'), 'type' => 'Textarea'), array('label' => esc_html__('Sidebar', 'carolina'), 'id' => 'carolina_about_option', 'type' => 'tab'), array('id' => 'site_about_option', 'label' => esc_html__('Enable Global Settings', 'carolina'), 'desc' => '', 'std' => 'yes', 'type' => 'radio', 'class' => '', 'choices' => array(array('label' => esc_html__('Yes', 'carolina'), 'value' => 'yes'), array('label' => esc_html__('No', 'carolina'), 'value' => 'no'))), array('id' => 'site_about_sidebar_option', 'label' => esc_html__('Disable Sidebar', 'carolina'), 'desc' => '', 'std' => 'no', 'type' => 'radio', 'class' => '', 'section' => 'archive_page', 'choices' => array(array('label' => esc_html__('Yes', 'carolina'), 'value' => 'yes'), array('label' => esc_html__('No', 'carolina'), 'value' => 'no'))), array('id' => 'site_about_sidebar_name', 'label' => esc_html__('Sidebar Name', 'carolina'), 'desc' => '', 'std' => 'sidebar', 'type' => 'sidebar-select', 'class' => '', 'section' => 'archive_page'), array('id' => 'site_about_sidebar_position', 'label' => esc_html__('Sidebar Position', 'carolina'), 'desc' => '', 'std' => 'right', 'type' => 'select', 'section' => 'archive_page', 'class' => '', 'choices' => array(array('label' => esc_html__('Left', 'carolina'), 'value' => 'left'), array('label' => esc_html__('Right', 'carolina'), 'value' => 'right')))));
    $carolina_recipe_meta_box = array('id' => 'recipe_meta_box', 'title' => esc_html__('Options', 'carolina'), 'desc' => '', 'pages' => array('page'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('label' => esc_html__('Heading', 'carolina'), 'id' => 'carolina_recipe_display', 'type' => 'tab'), array('id' => 'site_carolina_recipe_title', 'label' => esc_html__('Enter the title for the Recipe Page', 'carolina'), 'type' => 'text'), array('id' => 'site_carolina_recipe_description', 'label' => esc_html__('Enter the description for the Recipe Page', 'carolina'), 'type' => 'textarea-simple'), array('id' => 'site_carolina_recipe_heading', 'label' => esc_html__('Enter the heading for the Recipe Section ', 'carolina'), 'type' => 'text'), array('label' => esc_html__('Post', 'carolina'), 'id' => 'carolina_recipe_post', 'type' => 'tab'), array('id' => 'site_carolina_recipe_post_no', 'label' => esc_html__('Enter the number of posts to display', 'carolina'), 'type' => 'select', 'std' => '-1', 'choices' => array(array('label' => esc_html__('All', 'carolina'), 'value' => '-1'), array('label' => esc_html__('1', 'carolina'), 'value' => '1'), array('label' => esc_html__('2', 'carolina'), 'value' => '2'), array('label' => esc_html__('3', 'carolina'), 'value' => '3'), array('label' => esc_html__('4', 'carolina'), 'value' => '4'), array('label' => esc_html__('5', 'carolina'), 'value' => '5'), array('label' => esc_html__('6', 'carolina'), 'value' => '6'), array('label' => esc_html__('7', 'carolina'), 'value' => '7'), array('label' => esc_html__('8', 'carolina'), 'value' => '8'), array('label' => esc_html__('9', 'carolina'), 'value' => '9'), array('label' => esc_html__('10', 'carolina'), 'value' => '10'))), array('label' => esc_html__('Sidebar', 'carolina'), 'id' => 'carolina_recipe_option', 'type' => 'tab'), array('id' => 'site_recipe_global_option', 'label' => esc_html__('Enable Global Settings', 'carolina'), 'desc' => '', 'std' => 'yes', 'type' => 'radio', 'class' => '', 'choices' => array(array('label' => esc_html__('Yes', 'carolina'), 'value' => 'yes'), array('label' => esc_html__('No', 'carolina'), 'value' => 'no'))), array('id' => 'site_recipe_sidebar_option', 'label' => esc_html__('Disable Sidebar', 'carolina'), 'desc' => '', 'std' => 'no', 'type' => 'radio', 'class' => '', 'choices' => array(array('label' => esc_html__('Yes', 'carolina'), 'value' => 'yes'), array('label' => esc_html__('No', 'carolina'), 'value' => 'no'))), array('id' => 'site_recipe_sidebar_name', 'label' => esc_html__('Sidebar Name', 'carolina'), 'desc' => '', 'std' => 'sidebar-select', 'type' => 'select', 'class' => ''), array('id' => 'site_recipe_sidebar_position', 'label' => esc_html__('Sidebar Position', 'carolina'), 'desc' => '', 'std' => 'right', 'type' => 'select', 'class' => '', 'choices' => array(array('label' => esc_html__('Left', 'carolina'), 'value' => 'left'), array('label' => esc_html__('Right', 'carolina'), 'value' => 'right')))));
    $carolina_contact_meta_box = array('id' => 'carolina_contact_meta_box', 'title' => esc_html__('Contact Page Option', 'carolina'), 'desc' => '', 'pages' => array('page'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('label' => esc_html__('Title', 'carolina'), 'id' => 'carolina_contact_title', 'type' => 'tab'), array('id' => 'site_carolina_contact_title', 'label' => esc_html__('Enter the title for the Contact Page', 'carolina'), 'type' => 'text'), array('id' => 'site_carolina_contact_description', 'label' => esc_html__('Enter the description for the Contact Page', 'carolina'), 'type' => 'textarea-simple'), array('id' => 'site_carolina_contact_heading', 'label' => esc_html__('Enter the heading for the Location section', 'carolina'), 'type' => 'text'), array('id' => 'site_carolina_contact_comment_heading', 'label' => esc_html__('Enter the heading for the comment-form', 'carolina'), 'type' => 'text'), array('label' => esc_html__('Location', 'carolina'), 'id' => 'carolina_contact_location', 'type' => 'tab'), array('id' => 'site_content_contact_location', 'label' => esc_html__('Location', 'carolina'), 'desc' => esc_html__('Enter the address of the company', 'carolina'), 'std' => '', 'type' => 'textarea', 'class' => ''), array('id' => 'site_content_contact_ph', 'label' => esc_html__('Contact Number', 'carolina'), 'desc' => esc_html__('Enter the contact number of the company', 'carolina'), 'std' => '', 'type' => 'textarea', 'class' => ''), array('label' => esc_html__('Contact Form', 'carolina'), 'id' => 'carolina_contact_form', 'type' => 'tab'), array('id' => 'carolina_contact_form_content', 'label' => esc_html__('Please Enter the shortcode of the contact form', 'carolina'), 'type' => 'textarea-simple'), array('label' => esc_html__('Sidebar', 'carolina'), 'id' => 'carolina_contact_option', 'type' => 'tab'), array('id' => 'carolina_contact_global_option', 'label' => esc_html__('Enable Global Settings', 'carolina'), 'desc' => '', 'std' => 'yes', 'type' => 'radio', 'class' => '', 'choices' => array(array('label' => esc_html__('Yes', 'carolina'), 'value' => 'yes'), array('label' => esc_html__('No', 'carolina'), 'value' => 'no'))), array('id' => 'carolina_contact_sidebar_option', 'label' => esc_html__('Disable Sidebar', 'carolina'), 'desc' => '', 'std' => 'no', 'type' => 'radio', 'class' => '', 'choices' => array(array('label' => esc_html__('Yes', 'carolina'), 'value' => 'yes'), array('label' => esc_html__('No', 'carolina'), 'value' => 'no')), 'condition' => 'carolina_contact_global_option:is(no)'), array('id' => 'site_contact_sidebar_name', 'label' => esc_html__('Sidebar Name', 'carolina'), 'desc' => '', 'std' => 'sidebar', 'type' => 'sidebar-select', 'condition' => 'carolina_contact_global_option:is(no),carolina_contact_sidebar_option:is(no)'), array('id' => 'site_contact_sidebar_position', 'label' => esc_html__('Sidebar Position', 'carolina'), 'desc' => '', 'std' => 'right', 'type' => 'select', 'class' => '', 'choices' => array(array('label' => esc_html__('Left', 'carolina'), 'value' => 'left'), array('label' => esc_html__('Right', 'carolina'), 'value' => 'right')), 'condition' => 'carolina_contact_global_option:is(no),carolina_contact_sidebar_option:is(no)')));
    $carolina_recipe_post_type_meta_box = array('id' => 'recipe_post_meta_box', 'title' => esc_html__('Icons', 'carolina'), 'desc' => '', 'pages' => array('recipe'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('id' => 'recipe_post_meta_box_option', 'label' => esc_html__('Upload Icons', 'carolina'), 'desc' => '', 'std' => '', 'type' => 'upload', 'class' => '')));
    $carolina_page_meta_box = array('id' => 'carolina_page_meta_box', 'title' => esc_html__('Page Option', 'carolina'), 'desc' => '', 'pages' => array('page'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('label' => esc_html__('Title', 'carolina'), 'id' => 'carolina_page_title', 'type' => 'tab'), array('id' => 'site_carolina_page_title', 'label' => esc_html__('Enter the title for the Page', 'carolina'), 'type' => 'text'), array('id' => 'site_carolina_page_description', 'label' => esc_html__('Enter the description for the Page', 'carolina'), 'type' => 'textarea-simple'), array('label' => esc_html__('Sidebar', 'carolina'), 'id' => 'carolina_page_option', 'type' => 'tab'), array('id' => 'site_page_global_option', 'label' => esc_html__('Enable Global Settings', 'carolina'), 'desc' => '', 'std' => 'yes', 'type' => 'radio', 'class' => '', 'choices' => array(array('label' => esc_html__('Yes', 'carolina'), 'value' => 'yes'), array('label' => esc_html__('No', 'carolina'), 'value' => 'no'))), array('id' => 'site_page_sidebar_option', 'label' => esc_html__('Disable Sidebar', 'carolina'), 'desc' => '', 'std' => 'no', 'type' => 'radio', 'class' => '', 'choices' => array(array('label' => esc_html__('Yes', 'carolina'), 'value' => 'yes'), array('label' => esc_html__('No', 'carolina'), 'value' => 'no'))), array('id' => 'site_page_sidebar_name', 'label' => esc_html__('Sidebar Name', 'carolina'), 'desc' => '', 'std' => 'sidebar', 'type' => 'sidebar-select', 'class' => ''), array('id' => 'site_page_sidebar_position', 'label' => esc_html__('Sidebar Position', 'carolina'), 'desc' => '', 'std' => 'right', 'type' => 'select', 'class' => '', 'choices' => array(array('label' => esc_html__('Left', 'carolina'), 'value' => 'left'), array('label' => esc_html__('Right', 'carolina'), 'value' => 'right')))));
    if (function_exists('ot_register_meta_box')) {
        ot_register_meta_box($carolina_recipe_post_type_meta_box);
        $post_id = isset($_GET['post']) ? $_GET['post'] : (isset($_POST['post_ID']) ? $_POST['post_ID'] : false);
        if ($post_id) {
            $post_template = get_post_meta($post_id, '_wp_page_template', true);
            // Home page metabox
            if ($post_template == 'page-home.php') {
                ot_register_meta_box($carolina_home_meta_box);
            }
            // About us metabox
            if ($post_template == 'page-carolina.php') {
                ot_register_meta_box($carolina_about_meta_box);
            }
            // Contact us metabox
            if ($post_template == 'page-contact.php') {
                ot_register_meta_box($carolina_contact_meta_box);
            }
            if ($post_template == 'page-recipe.php') {
                ot_register_meta_box($carolina_recipe_meta_box);
            }
            if ($post_template == 'default') {
                ot_register_meta_box($carolina_page_meta_box);
            }
        }
    }
}
Пример #16
0
function _cb_meta()
{
    $cb_go = array('id' => 'cb_go', 'title' => 'Valenti General Options', 'desc' => '', 'pages' => array('post'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('id' => 'cb_featured_post_menu', 'label' => 'Valenti Dropdown Menu Featured', 'desc' => 'Featured on category dropdown "Valenti Megamenu: Featured/Random + Recent Posts"', 'std' => '', 'type' => 'select', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'choices' => array(array('value' => 'off', 'label' => 'Off', 'src' => ''), array('value' => 'featured', 'label' => 'Featured On Category Menu', 'src' => ''))), array('id' => 'cb_featured_post', 'label' => 'Valenti Homepage Grid Feature', 'desc' => 'Featured on first grid on the homepage', 'std' => '', 'type' => 'select', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'choices' => array(array('value' => 'off', 'label' => 'Off', 'src' => ''), array('value' => 'featured', 'label' => 'Featured On First Grid', 'src' => ''))), array('id' => 'cb_featured_cat_post', 'label' => 'Valenti Category Feature', 'desc' => 'Featured on category grid/slider', 'std' => '', 'type' => 'select', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'choices' => array(array('value' => 'off', 'label' => 'Off', 'src' => ''), array('value' => 'featured', 'label' => 'Featured On Feature Grid/slider', 'src' => ''))), array('id' => 'cb_featured_image_style_override', 'label' => 'Override Global Featured Image Style', 'desc' => 'Enable this to override "Theme Options -> Posts -> Global Featured Image Style Override" option.', 'std' => '', 'type' => 'select', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'choices' => array(array('value' => 'off', 'label' => '-', 'src' => ''), array('value' => 'on', 'label' => 'Override', 'src' => ''))), array('id' => 'cb_featured_image_style', 'label' => 'Featured Image Style', 'desc' => '', 'std' => 'standard', 'type' => 'radio-image', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'choices' => array(array('value' => 'standard', 'label' => 'Standard', 'src' => '/img_st.png'), array('value' => 'full-width', 'label' => 'Full-Width', 'src' => '/img_fw.png'), array('value' => 'full-background', 'label' => 'Full-Background', 'src' => '/img_fb.png'), array('value' => 'parallax', 'label' => 'Parallax', 'src' => '/img_pa.png'), array('value' => 'off', 'label' => 'Do not show featured image', 'src' => '/off.png'))), array('id' => 'cb_full_width_post', 'label' => 'Post Style', 'desc' => '', 'std' => 'sidebar', 'type' => 'radio-image', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'choices' => array(array('value' => 'sidebar', 'label' => 'With Sidebar', 'src' => '/post_sidebar.png'), array('value' => 'sidebar_left', 'label' => 'With Left Sidebar', 'src' => '/post_sidebar_left.png'), array('value' => 'nosidebar', 'label' => 'No Sidebar', 'src' => '/post_nosidebar.png'))), array('label' => 'Featured Image Credit Line', 'id' => 'cb_image_credit', 'type' => 'text', 'desc' => 'Optional Photograph credit line', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '')));
    ot_register_meta_box($cb_go);
    $cb_hpb = array('id' => 'cb_hpb', 'title' => 'Valenti Drag & Drop Builder', 'desc' => '', 'pages' => array('page'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('id' => 'cb_section_a', 'label' => 'Section A (Full-Width)', 'desc' => '', 'std' => '', 'type' => 'list-item', 'section' => 'cb_homepage', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'settings' => array(array('id' => 'cb_a_module_style', 'label' => 'Module Block', 'desc' => '', 'std' => 'm-aa', 'type' => 'radio-image', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'choices' => array(array('value' => 'm-aa', 'label' => 'Module A', 'src' => '/module_a_fw.png'), array('value' => 'grid-4a', 'label' => 'Grid 4', 'src' => '/grid_4.png'), array('value' => 'grid-5a', 'label' => 'Grid 5', 'src' => '/grid_5.png'), array('value' => 'grid-5-fa', 'label' => 'Grid 5', 'src' => '/grid_5_f.png'), array('value' => 'grid-6a', 'label' => 'Grid 6', 'src' => '/grid_6.png'), array('value' => 's-1a', 'label' => 'Slider A', 'src' => '/module_slider_a_fw.png'), array('value' => 's-2a', 'label' => 'Slider B', 'src' => '/module_slider_b_fw.png'), array('value' => 'ad-970a', 'label' => 'Ad: 970x90', 'src' => '/adc.png'), array('value' => 'customa', 'label' => 'Custom Code', 'src' => '/custom.png'))), array('label' => 'Category', 'id' => 'cb_a_latest_posts', 'type' => 'category-checkbox', 'desc' => '', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => ''), array('id' => 'cb_ad_code_a', 'label' => 'Ad Code', 'desc' => '', 'std' => '', 'type' => 'textarea', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => ''), array('id' => 'cb_slider_a', 'label' => 'Number Of Posts To Show', 'desc' => '', 'std' => '3', 'type' => 'numeric-slider', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '3,12,3', 'class' => ''), array('id' => 'cb_style_a', 'label' => 'Style', 'desc' => '', 'std' => '', 'type' => 'select', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'choices' => array(array('value' => 'cb_light_a', 'label' => 'Light', 'src' => ''), array('value' => 'cb_dark_a', 'label' => 'Dark', 'src' => ''))), array('id' => 'cb_subtitle_a', 'label' => 'Optional Subtitle', 'desc' => '', 'std' => '', 'type' => 'text', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => ''), array('id' => 'cb_custom_a', 'label' => 'Custom Code', 'desc' => '', 'std' => '', 'type' => 'textarea', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => ''))), array('id' => 'cb_section_b', 'label' => 'Section B + "Section B Sidebar (In Appearance -> Widgets)"', 'desc' => '', 'std' => '', 'type' => 'list-item', 'section' => 'cb_homepage', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'settings' => array(array('id' => 'cb_b_module_style', 'label' => 'Module Block', 'desc' => '', 'std' => 'm-ab', 'type' => 'radio-image', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'choices' => array(array('value' => 'm-ab', 'label' => 'Module A', 'src' => '/module_a.png'), array('value' => 'm-bb', 'label' => 'Module B', 'src' => '/module_b.png'), array('value' => 'm-cb', 'label' => 'Module C', 'src' => '/module_c.png'), array('value' => 'm-db', 'label' => 'Module D', 'src' => '/module_d.png'), array('value' => 'ad-728b', 'label' => 'Ad: 728x90', 'src' => '/adb.png'), array('value' => 'ad-336b', 'label' => 'Ad: 336x280', 'src' => '/add.png'), array('value' => 's-1b', 'label' => 'Slider A', 'src' => '/module_slider_a.png'), array('value' => 's-2b', 'label' => 'Slider B', 'src' => '/module_slider_b.png'), array('value' => 'customb', 'label' => 'Custom Code', 'src' => '/custom.png'))), array('label' => 'Category', 'id' => 'cb_b_latest_posts', 'type' => 'category-checkbox', 'desc' => '', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => ''), array('id' => 'cb_ad_code_b', 'label' => 'Ad Code', 'desc' => '', 'std' => '', 'type' => 'textarea', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => ''), array('id' => 'cb_slider_b', 'label' => 'Number Of Posts To Show', 'desc' => '', 'std' => '2', 'type' => 'numeric-slider', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '2,12,1', 'class' => ''), array('id' => 'cb_style_b', 'label' => 'Style', 'desc' => '', 'std' => '', 'type' => 'select', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'choices' => array(array('value' => 'cb_light_b', 'label' => 'Light', 'src' => ''), array('value' => 'cb_dark_b', 'label' => 'Dark', 'src' => ''))), array('id' => 'cb_subtitle_b', 'label' => 'Optional Subtitle', 'desc' => '', 'std' => '', 'type' => 'text', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => ''), array('id' => 'cb_custom_b', 'label' => 'Custom Code', 'desc' => '', 'std' => '', 'type' => 'textarea', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => ''))), array('id' => 'cb_section_c', 'label' => 'Section C (Full-Width)', 'desc' => '', 'std' => '', 'type' => 'list-item', 'section' => 'cb_homepage', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'settings' => array(array('id' => 'cb_c_module_style', 'label' => 'Module Block', 'desc' => '', 'std' => 'm-ac', 'type' => 'radio-image', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'choices' => array(array('value' => 'm-ac', 'label' => 'Module A', 'src' => '/module_a_fw.png'), array('value' => 'grid-4c', 'label' => 'Grid 4', 'src' => '/grid_4.png'), array('value' => 'grid-5c', 'label' => 'Grid 5', 'src' => '/grid_5.png'), array('value' => 'grid-5-fc', 'label' => 'Grid 5', 'src' => '/grid_5_f.png'), array('value' => 'grid-6c', 'label' => 'Grid 6', 'src' => '/grid_6.png'), array('value' => 's-1c', 'label' => 'Slider A', 'src' => '/module_slider_a_fw.png'), array('value' => 's-2c', 'label' => 'Slider B', 'src' => '/module_slider_b_fw.png'), array('value' => 'ad-970c', 'label' => 'Ad: 970x90', 'src' => '/adc.png'), array('value' => 'customc', 'label' => 'Custom Code', 'src' => '/custom.png'))), array('label' => 'Category', 'id' => 'cb_c_latest_posts', 'type' => 'category-checkbox', 'desc' => '', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => ''), array('id' => 'cb_ad_code_c', 'label' => 'Ad Code', 'desc' => '', 'std' => '', 'type' => 'textarea', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => ''), array('id' => 'cb_slider_c', 'label' => 'Number Of Posts To Show', 'desc' => '', 'std' => '3', 'type' => 'numeric-slider', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '3,12,3', 'class' => ''), array('id' => 'cb_style_c', 'label' => 'Style', 'desc' => '', 'std' => '', 'type' => 'select', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'choices' => array(array('value' => 'cb_light_c', 'label' => 'Light', 'src' => ''), array('value' => 'cb_dark_c', 'label' => 'Dark', 'src' => ''))), array('id' => 'cb_subtitle_c', 'label' => 'Optional Subtitle', 'desc' => '', 'std' => '', 'type' => 'text', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => ''), array('id' => 'cb_custom_c', 'label' => 'Custom Code', 'desc' => '', 'std' => '', 'type' => 'textarea', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => ''))), array('id' => 'cb_section_d', 'label' => 'Section D + "Section D Sidebar (In Appearance -> Widgets)"', 'desc' => '', 'std' => '', 'type' => 'list-item', 'section' => 'cb_homepage', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'settings' => array(array('id' => 'cb_d_module_style', 'label' => 'Module Block', 'desc' => '', 'std' => 'm-ad', 'type' => 'radio-image', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'choices' => array(array('value' => 'm-ad', 'label' => 'Module A', 'src' => '/module_a.png'), array('value' => 'm-bd', 'label' => 'Module B', 'src' => '/module_b.png'), array('value' => 'm-cd', 'label' => 'Module C', 'src' => '/module_c.png'), array('value' => 'm-dd', 'label' => 'Module D', 'src' => '/module_d.png'), array('value' => 'ad-728d', 'label' => 'Ad: 728x90', 'src' => '/adb.png'), array('value' => 'ad-336d', 'label' => 'Ad: 336x280', 'src' => '/add.png'), array('value' => 's-1d', 'label' => 'Slider A', 'src' => '/module_slider_a.png'), array('value' => 's-2d', 'label' => 'Slider B', 'src' => '/module_slider_b.png'), array('value' => 'customd', 'label' => 'Custom Code', 'src' => '/custom.png'))), array('label' => 'Category', 'id' => 'cb_d_latest_posts', 'type' => 'category-checkbox', 'desc' => '', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => ''), array('id' => 'cb_ad_code_d', 'label' => 'Ad Code', 'desc' => '', 'std' => '', 'type' => 'textarea', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => ''), array('id' => 'cb_slider_d', 'label' => 'Number Of Posts To Show', 'desc' => '', 'std' => '2', 'type' => 'numeric-slider', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '2,12,1', 'class' => ''), array('id' => 'cb_style_d', 'label' => 'Style', 'desc' => '', 'std' => '', 'type' => 'select', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'choices' => array(array('value' => 'cb_light_d', 'label' => 'Light', 'src' => ''), array('value' => 'cb_dark_d', 'label' => 'Dark', 'src' => ''))), array('id' => 'cb_subtitle_d', 'label' => 'Optional Subtitle', 'desc' => '', 'std' => '', 'type' => 'text', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => ''), array('id' => 'cb_custom_d', 'label' => 'Custom Code', 'desc' => '', 'std' => '', 'type' => 'textarea', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '')))));
    ot_register_meta_box($cb_hpb);
}
Пример #17
0
function rb_meta_boxes()
{
    $sidebars = ot_get_option('rb_sidebars');
    $sidebars_array = array();
    $sidebars_k = 0;
    if (!empty($sidebars)) {
        foreach ($sidebars as $sidebar) {
            $sidebars_array[$sidebars_k++] = array('label' => $sidebar['title'], 'value' => $sidebar['id']);
        }
    }
    $rb_meta_box_tagline = array('id' => 'rb_meta_box_tagline', 'title' => 'Tagline', 'desc' => '', 'pages' => array('page', 'portfolio'), 'context' => 'side', 'priority' => 'high', 'fields' => array(array('id' => 'rb_meta_box_tagline_set', 'label' => 'Tagline', 'desc' => 'Choose a tagline for the current page. You can use a <span> object to make highlights.', 'std' => '', 'type' => 'text', 'class' => '')));
    $rb_meta_box_sidebar = array('id' => 'rb_meta_box_sidebar', 'title' => 'Layout', 'desc' => 'If you chose the sidebar layout, please choose a sidebar from the list below. Sidebars can be created in the Theme Options and configured in the Theme Widgets.', 'pages' => array('page'), 'context' => 'side', 'priority' => 'high', 'fields' => array(array('id' => 'rb_meta_box_sidebar_layout', 'label' => 'Layout', 'desc' => '', 'std' => 'full-width', 'type' => 'radio_image', 'class' => ''), array('id' => 'rb_meta_box_sidebar_set', 'label' => 'Sidebar', 'desc' => '', 'std' => '', 'type' => 'select', 'class' => '', 'choices' => $sidebars_array)));
    $rb_meta_box_slider_home = array('id' => 'rb_meta_box_slider_home', 'title' => 'Slider', 'desc' => '', 'pages' => array('page'), 'context' => 'side', 'priority' => 'high', 'fields' => array(array('id' => 'rb_meta_box_slider_home_set', 'label' => 'Slider ID', 'desc' => 'Write the slider id (alias) which will be used for this page. Please configure sliders inside the Revolution Slider admin panel!', 'std' => '', 'type' => 'text', 'class' => '')));
    $rb_meta_box_video = array('id' => 'rb_meta_box_video', 'title' => 'Video', 'desc' => '', 'pages' => array('videofolio'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('id' => 'rb_meta_box_video_code', 'label' => 'Video embedding code', 'desc' => 'Insert the embedding code if you\'re using videos from Vimeo or YouTube', 'std' => '', 'type' => 'textarea-simple', 'class' => '')));
    $rb_meta_box_home = array('id' => 'rb_meta_box_home', 'title' => 'Homepage Options', 'desc' => '', 'pages' => array('page'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('id' => 'rb_home_slider_show', 'label' => 'Display Slider', 'desc' => 'Choose wheter you want to display a slider on the homepage or not.', 'std' => 'no', 'type' => 'radio', 'class' => '', 'choices' => array(array('label' => 'Yes', 'value' => 'yes'), array('label' => 'No', 'value' => 'no'))), array('id' => 'rb_home_slider_setup', 'label' => 'Slider Setup', 'desc' => 'This is a slider which supports both images & videos. Please make sure that all of your images/videos share the same size!', 'std' => '', 'type' => 'list-item', 'class' => 'rb_slider', 'choices' => array(), 'settings' => array(array('id' => 'rb_slide_type', 'label' => 'Slide Type', 'desc' => 'Choose the slide\'s type', 'std' => '', 'type' => 'select', 'class' => 'rb_slide_type', 'choices' => array(array('label' => 'Image', 'value' => 'image'), array('label' => 'Embedded Video', 'value' => 'emb_video'), array('label' => 'Self Hosted Video', 'value' => 'self_video'))), array('id' => 'rb_slide_image', 'label' => 'Image', 'desc' => 'Upload an image.', 'std' => '', 'type' => 'upload', 'class' => 'rb_slide_image', 'choices' => array()), array('id' => 'rb_slide_caption', 'label' => 'Caption', 'desc' => 'Write a short caption for the current image.', 'std' => '', 'type' => 'text', 'class' => 'rb_slide_image', 'choices' => array()), array('id' => 'rb_slide_video_code', 'label' => 'Video Code', 'desc' => 'Paste the video embedding code inside this field.', 'std' => '', 'type' => 'textarea', 'class' => 'rb_slide_emb', 'choices' => array()), array('id' => 'rb_slide_video_1', 'label' => 'MP4 File', 'desc' => 'Upload an .mp4 video file or paste a link to one.', 'std' => '', 'type' => 'upload', 'class' => 'rb_slide_hosted', 'choices' => array()), array('id' => 'rb_slide_video_2', 'label' => 'OGV File', 'desc' => 'Upload an .ogv video file or paste a link to one.', 'std' => '', 'type' => 'upload', 'class' => 'rb_slide_hosted', 'choices' => array()), array('id' => 'rb_slide_video_3', 'label' => 'Poster File', 'desc' => 'Upload a poster image for the player or paste a link to one.', 'std' => '', 'type' => 'upload', 'class' => 'rb_slide_hosted', 'choices' => array())))));
    $rb_meta_box_folio = array('id' => 'rb_meta_box_folio', 'title' => 'Project Meta', 'desc' => '', 'pages' => array('portfolio'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('id' => 'rb_post_date', 'label' => 'Date', 'desc' => 'Write the date when you released this project.', 'std' => '', 'type' => 'text', 'class' => '', 'choices' => array()), array('id' => 'rb_post_skill', 'label' => 'Skills', 'desc' => 'Write the skills involved in this project.', 'std' => '', 'type' => 'text', 'class' => '', 'choices' => array()), array('id' => 'rb_post_client', 'label' => 'Client', 'desc' => 'Write the client of this project.', 'std' => '', 'type' => 'text', 'class' => '', 'choices' => array()), array('id' => 'rb_post_link', 'label' => 'Link', 'desc' => 'Write a link to the project.', 'std' => '', 'type' => 'text', 'class' => '', 'choices' => array())));
    $post_id = isset($_GET['post']) ? $_GET['post'] : (isset($_POST['post_ID']) ? $_POST['post_ID'] : 'no');
    $template_file = $post_id != 'no' ? get_post_meta($post_id, '_wp_page_template', TRUE) : 'no';
    if ($template_file == 'template-slider-full.php' || $template_file == 'template-slider-fit.php') {
        ot_register_meta_box($rb_meta_box_slider_home);
    } else {
        ot_register_meta_box($rb_meta_box_tagline);
        ot_register_meta_box($rb_meta_box_sidebar);
    }
    ot_register_meta_box($rb_meta_box_folio);
    ot_register_meta_box($rb_meta_box_video);
}
Пример #18
0
/**
 * Meta Boxes demo code.
 *
 * You can find all the available option types
 * in demo-theme-options.php.
 *
 * @return    void
 *
 * @access    private
 * @since     2.0
 */
function _custom_meta_boxes()
{
    /**
     * Create a custom meta boxes array that we pass to 
     * the OptionTree Meta Box API Class.
     */
    $post_meta_box_gallery = array('id' => 'post_meta_gallery', 'title' => 'Gallery Type', 'pages' => array('post'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('label' => 'How would you like to display your gallery?', 'id' => 'gallery-type', 'type' => 'radio', 'desc' => 'We suggest using 8 images for Thumbnail type.', 'choices' => array(array('label' => '1 Column', 'value' => '1'), array('label' => '2 Columns', 'value' => '2'), array('label' => '3 Columns', 'value' => '3')), 'std' => '1')));
    $post_meta_box_video = array('id' => 'post_meta_video', 'title' => 'Video Settings', 'pages' => array('post'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('label' => 'Video URL', 'id' => 'post_video', 'type' => 'textarea-simple', 'desc' => 'Video URL. You can find a list of websites you can embed here: <a href="http://codex.wordpress.org/Embeds">Wordpress Embeds</a>', 'std' => '', 'rows' => '5'), array('label' => 'Is this a Vimeo video?', 'id' => 'post_video_vimeo', 'desc' => 'This adjustes the widescreen height so that vimeo vidoes are displayed correctly.', 'std' => '', 'type' => 'checkbox', 'choices' => array(array('value' => 'vimeo', 'label' => 'This is a Vimeo video. ')))));
    $post_meta_box_quote = array('id' => 'post_meta_quote', 'title' => 'Quote Settings', 'pages' => array('post'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('label' => 'Quote', 'id' => 'post_quote', 'type' => 'textarea-simple', 'desc' => 'Quote Text. Works only if this is a quote post.', 'std' => '', 'rows' => '3')));
    $post_meta_box_link = array('id' => 'post_meta_link', 'title' => 'Link Settings', 'pages' => array('post'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('label' => 'Link URL', 'id' => 'post_link_url', 'type' => 'text', 'desc' => 'Link URL. Works only if this is a link post.', 'std' => '', 'rows' => '1')));
    $post_meta_box_audio = array('id' => 'post_meta_audio', 'title' => 'Audio Settings', 'pages' => array('post'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('label' => 'MP3 File URL', 'id' => 'post_audio_mp3', 'type' => 'upload', 'desc' => 'The URL to the .mp3 audio file', 'std' => '', 'rows' => '1'), array('label' => 'Song title', 'id' => 'post_audio_title', 'type' => 'text', 'desc' => 'Title of the song to be displayed on the player', 'std' => '', 'rows' => '1')));
    $post_meta_box_sidebar_gallery = array('id' => 'meta_box_sidebar_gallery', 'title' => 'Gallery', 'pages' => array('post', 'portfolio'), 'context' => 'side', 'priority' => 'low', 'fields' => array(array('id' => 'pp_gallery_slider', 'type' => 'gallery', 'desc' => '', 'post_type' => 'post')));
    $page_metabox = array('id' => 'post_metaboxes_combined', 'title' => 'Page Settings', 'pages' => array('page'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('id' => 'tab0', 'label' => 'Header Override', 'type' => 'tab'), array('label' => 'Override Global Header?', 'id' => 'header_override', 'type' => 'on_off', 'desc' => 'You can override global header styles here', 'std' => 'off'), array('label' => 'Display Sub - Header', 'id' => 'subheader', 'type' => 'on_off', 'desc' => 'Would you like to display the Sub-Header?', 'std' => 'on', 'condition' => 'header_override:is(on)'), array('label' => 'Header in Grid', 'id' => 'header_grid', 'type' => 'on_off', 'desc' => 'If Off is selected, the header contents will be full width.', 'std' => 'on', 'condition' => 'header_override:is(on)'), array('label' => 'Header shopping cart', 'id' => 'header_cart', 'type' => 'on_off', 'desc' => 'Would you like to display the shopping cart inside the header?', 'std' => 'on', 'condition' => 'header_override:is(on)'), array('id' => 'tab1', 'label' => 'Page Title', 'type' => 'tab'), array('label' => 'Display Page Title Area', 'id' => 'display_pagetitle_area', 'type' => 'on_off', 'desc' => 'You can choose to display page title area', 'std' => 'on', 'section' => 'misc'), array('label' => 'PageTitle Style', 'id' => 'pagetitle_style', 'type' => 'radio', 'desc' => 'Which page title style would you like to use? <small>Overrides the global setting inside Theme Options</small>', 'choices' => array(array('label' => 'Style 1', 'value' => 'style1'), array('label' => 'Style 2', 'value' => 'style2')), 'std' => 'style1', 'condition' => 'display_pagetitle_area:is(on)'), array('label' => 'Display Breadcrumbs', 'id' => 'pagetitle_breadcrumbs', 'type' => 'on_off', 'desc' => 'You can choose to display the breadcrumbs', 'std' => 'on', 'condition' => 'display_pagetitle_area:is(on)'), array('id' => 'pagetitle_padding', 'label' => 'Page Title Padding', 'desc' => 'Page Title Padding value. <small>Overrides the global setting inside Theme Options</small>', 'std' => '', 'type' => 'measurement', 'condition' => 'display_pagetitle_area:is(on)'), array('label' => 'Page Title Background', 'id' => 'pagetitle_background', 'type' => 'background', 'desc' => 'Background setting for the breadcrumb <small>Overrides the global setting inside Theme Options</small>', 'condition' => 'display_pagetitle_area:is(on)'), array('label' => 'Sub Pages', 'id' => 'pagetitle_subpages', 'type' => 'list-item', 'desc' => 'You can add a submenu to your page title', 'section' => 'misc', 'settings' => array(array('label' => 'Link', 'id' => 'link', 'type' => 'text', 'desc' => 'Please write the url of the page')), 'condition' => 'display_pagetitle_area:is(on),pagetitle_style:is(style2)'), array('id' => 'tab2', 'label' => 'Sidebar', 'type' => 'tab'), array('id' => 'sidebar_set', 'label' => 'Sidebar', 'type' => 'sidebar_select', 'desc' => 'Select a sidebar to display inside the page. <small>Blog pages automatically display the Blog sidebar</small>'), array('label' => 'Sidebar Position', 'id' => 'sidebar_position', 'type' => 'radio', 'desc' => 'Select where the sidebar should be positioned', 'choices' => array(array('label' => 'Left', 'value' => 'left'), array('label' => 'Right', 'value' => 'right')), 'std' => 'no', 'condition' => 'sidebar_set:not()'), array('id' => 'tab3', 'label' => 'Portfolio Page', 'type' => 'tab'), array('label' => 'Portfolio Columns', 'id' => 'portfolio_columns', 'type' => 'radio-image', 'desc' => 'If this is a portfolio page, you can change the number of columns here. <br><small>Only works if you select the Portfolio template</small>', 'std' => 'three'), array('label' => 'Portfolio Categories', 'id' => 'portfolio_categories', 'type' => 'taxonomy-checkbox', 'desc' => 'If this is a portfolio page, which portfolio categories would you like to display?<small>Select at least one</small>', 'taxonomy' => 'project-category'), array('label' => 'Portfolio Items per Page', 'id' => 'portfolio_pagecount', 'type' => 'text', 'desc' => 'If this is a paginated portfolio, how man items would you like to show per page? <small>Enter -1 for unlimited</small>', 'rows' => '1', 'std' => '-1'), array('label' => 'Portfolio margins', 'id' => 'portfolio_margin', 'type' => 'on_off', 'desc' => 'If you want, you can separate the portfolio items with margin.', 'std' => 'off'), array('label' => 'Grayscale?', 'id' => 'grayscale', 'type' => 'on_off', 'desc' => 'If you want, you can make the images grayscale', 'std' => 'off'), array('label' => 'Always Show Titles?', 'id' => 'titles', 'type' => 'on_off', 'desc' => 'If you want, you can always show the portfolio titles', 'std' => 'off'), array('id' => 'tab4', 'label' => 'Revolution Slider', 'type' => 'tab'), array('label' => 'Revolution Slider Alias', 'id' => 'rev_slider_alias', 'type' => 'revslider-select', 'desc' => 'If you would like to display Revolution Slider on top of this page, please enter the slider alias', 'std' => '', 'rows' => '1'), array('id' => 'tab5', 'label' => 'Navigation', 'type' => 'tab'), array('label' => 'Select Page Primary Menu', 'id' => 'page_menu', 'type' => 'menu_select', 'desc' => 'If you select a menu here, it will override the main navigation menu.'), array('label' => 'Enable One-Page-Scroll Navigation?', 'id' => 'page_scroll', 'desc' => 'This enables the one page scroll navigation. When clicked on navigation elements, the page will scroll.', 'std' => 'off', 'type' => 'on_off')));
    $product_meta_box_settings = array('id' => 'product_settings', 'title' => 'Product Page Settings', 'pages' => array('product'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('label' => 'Related Posts', 'id' => 'related_products', 'type' => 'on_off', 'desc' => 'You can disable related products from here', 'std' => 'on'), array('label' => 'Enable Product Zoom', 'id' => 'product_zoom', 'type' => 'on_off', 'desc' => 'You can enable product zoom here. Make sure your original images are at least 2x the size of the displayed image. <small>This will disable the lightbox feature</small>', 'std' => 'off')));
    $portfolio_meta_box = array('id' => 'portfolio_settings', 'title' => 'Portfolio Settings', 'pages' => array('portfolio'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('id' => 'portfolio_layout', 'label' => 'Portfolio Layout', 'type' => 'radio', 'desc' => 'You can select between different layouts for the portfolio item.', 'choices' => array(array('label' => 'Layout 1', 'value' => 'layout1'), array('label' => 'Layout 2', 'value' => 'layout2')), 'std' => 'layout1'), array('label' => 'Header Background', 'id' => 'portfolio_header_background', 'type' => 'background', 'desc' => 'Background for the header.', 'condition' => 'portfolio_layout:is(layout2)'), array('label' => 'Portfolio Sub Text', 'id' => 'portfolio_subtext', 'type' => 'text', 'desc' => 'This is the subtext that is shown under the portfolio title.', 'rows' => '2', 'std' => ''), array('label' => 'Main Portfolio Page', 'id' => 'portfolio_main', 'type' => 'portfolio-select', 'desc' => 'Main Portfolio Page for this portfolio item. This is useful if you have multiple portfolios and have different child portfolio items.'), array('id' => 'portfolio_type', 'label' => 'Portfolio Type', 'type' => 'radio', 'desc' => 'What type of portfolio item is this? Always upload an image and set it as the featured image even if its a video portfolio.', 'choices' => array(array('label' => 'Standard', 'value' => 'standard'), array('label' => 'Image', 'value' => 'image'), array('label' => 'Gallery', 'value' => 'gallery'), array('label' => 'Video', 'value' => 'video'), array('label' => 'Link', 'value' => 'link')), 'std' => 'standard'), array('label' => 'Revolution Slider Alias', 'id' => 'rev_slider_alias', 'type' => 'revslider-select', 'desc' => 'If you would like, you can display a revolution slider rather than a slider.', 'std' => '', 'rows' => '1', 'condition' => 'portfolio_type:is(gallery)'), array('label' => 'Video URL', 'id' => 'portfolio_video', 'type' => 'textarea-simple', 'desc' => 'Video URL. Works only if this is a video portfolio item.', 'std' => '', 'rows' => '1', 'condition' => 'portfolio_type:is(video)'), array('label' => 'Is this a Vimeo video?', 'id' => 'portfolio_video_vimeo', 'desc' => 'This adjustes the widescreen height so that vimeo vidoes are displayed correctly.', 'std' => '', 'type' => 'checkbox', 'condition' => 'portfolio_type:is(video)', 'choices' => array(array('value' => 'vimeo', 'label' => 'This is a Vimeo video. '))), array('label' => 'Link', 'id' => 'portfolio_link', 'type' => 'text', 'desc' => 'Link to the live project if this is a Link type portfolio', 'rows' => '1', 'condition' => 'portfolio_type:is(link)'), array('label' => 'Portfolio Attributes', 'id' => 'portfolio_attributes', 'type' => 'list-item', 'desc' => 'Please add attributes for this portfolio. Ex: Client name, Client URL, etc.', 'settings' => array(array('label' => 'Value', 'id' => 'attribute_value', 'type' => 'text', 'desc' => 'Value of this attribute', 'rows' => '1')))));
    /**
     * Register our meta boxes using the 
     * ot_register_meta_box() function.
     */
    ot_register_meta_box($post_meta_box_video);
    ot_register_meta_box($post_meta_box_gallery);
    ot_register_meta_box($post_meta_box_quote);
    ot_register_meta_box($post_meta_box_link);
    ot_register_meta_box($post_meta_box_audio);
    ot_register_meta_box($post_meta_box_sidebar_gallery);
    ot_register_meta_box($page_metabox);
    ot_register_meta_box($product_meta_box_settings);
    ot_register_meta_box($portfolio_meta_box);
}
function landx_onepage_meta_boxes()
{
    if (function_exists('ot_get_option')) {
        $my_meta_box = array('id' => 'landx_onepage_meta_box', 'title' => 'Landx One-page Template Settings', 'desc' => 'This option only applicable when you select one page Template', 'pages' => array('page'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('id' => 'onepage_general_settings', 'label' => 'General settings', 'type' => 'tab', 'operator' => 'and'), array('id' => 'onepage_preloader', 'label' => __('Preloader', THEMENAME), 'desc' => '', 'std' => THEMEURI . 'admin/assets/images/loading.gif', 'type' => 'upload', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array()), array('id' => 'nav_display_type', 'label' => __('Navigation display in header', THEMENAME), 'desc' => '', 'std' => 'off', 'type' => 'on-off', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'home_link', 'label' => __('Home link', THEMENAME), 'desc' => '', 'std' => 'on', 'type' => 'on-off', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'home_text', 'label' => __('Home Text', THEMENAME), 'desc' => '', 'std' => 'Home', 'type' => 'text', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => 'home_link:is(on)', 'operator' => 'and'), array('id' => 'header_logo_display', 'label' => __('Header logo display', THEMENAME), 'desc' => '', 'std' => 'on', 'type' => 'on-off', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'header_logo', 'label' => __('Header logo', THEMENAME), 'desc' => '', 'std' => THEMEURI . '/images/logo.png', 'type' => 'upload', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => 'header_logo_display:is(on)', 'operator' => 'and'), array('id' => 'social_button_display', 'label' => __('Social link display', THEMENAME), 'desc' => '', 'std' => 'on', 'type' => 'on-off', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'onepage_header_settings', 'label' => 'Header settings', 'type' => 'tab', 'operator' => 'and'), array('id' => 'onepage_header_style', 'label' => 'Header style', 'desc' => '', 'std' => 'dark', 'type' => 'select', 'class' => '', 'rows' => '', 'choices' => array(array('value' => 'image', 'label' => 'Image', 'src' => ''), array('value' => 'image_slider', 'label' => 'Images Slider', 'src' => ''), array('value' => 'video', 'label' => 'HTML5 video', 'src' => ''), array('value' => 'shortcode', 'label' => 'Custom shortcode', 'src' => '')), 'operator' => 'and', 'condition' => ''), array('id' => 'onepage_header_image', 'label' => 'Header Background image', 'desc' => 'Header image settings in <strong>Landx Page settings > One page settings - Background image</strong>', 'std' => '', 'type' => 'Textblock', 'class' => '', 'choices' => array(), 'operator' => 'and', 'condition' => 'onepage_header_style:is(image)'), array('id' => 'onepage_image_slider', 'label' => 'Slider Images', 'desc' => '', 'std' => '', 'type' => 'gallery', 'class' => '', 'choices' => array(), 'operator' => 'and', 'condition' => 'onepage_header_style:is(image_slider)'), array('id' => 'mp4_video_url', 'label' => '.mp4 Video url', 'desc' => '', 'std' => '', 'type' => 'upload', 'class' => '', 'choices' => array(), 'operator' => 'and', 'condition' => 'onepage_header_style:is(video)'), array('id' => 'webm_video_url', 'label' => '.webm video url', 'desc' => '', 'std' => '', 'type' => 'upload', 'class' => '', 'choices' => array(), 'operator' => 'and', 'condition' => 'onepage_header_style:is(video)'), array('id' => 'onepage_header_slider', 'label' => 'Slider shortcode', 'desc' => '', 'std' => '', 'type' => 'text', 'class' => '', 'rows' => 3, 'choices' => array(), 'operator' => 'and', 'condition' => 'onepage_header_style:is(shortcode)'), array('id' => 'content_settings', 'label' => 'Section settings', 'type' => 'tab', 'operator' => 'and'), array('id' => 'pages', 'label' => __('Pages', THEMENAME), 'desc' => 'Selectd page will appear in onepage', 'std' => '', 'type' => 'list-item', 'section' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'settings' => array(array('id' => 'page_id', 'label' => 'Select a page', 'desc' => '', 'std' => '', 'type' => 'page-select', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => ''), array('id' => 'display_in_menu', 'label' => 'Display in menu', 'desc' => '', 'std' => 'on', 'type' => 'on-off', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => ''), array('id' => 'link_type', 'label' => 'Menu link type', 'desc' => '', 'std' => 'internal', 'type' => 'select', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => 'display_in_menu:is(on)', 'operator' => 'and', 'choices' => array(array('value' => 'internal', 'label' => 'Internal', 'src' => ''), array('value' => 'external', 'label' => 'External', 'src' => ''), array('value' => 'custom_link', 'label' => 'Custom Link', 'src' => ''))), array('id' => 'custom_link_url', 'label' => 'Custom link url', 'desc' => '', 'std' => '#', 'type' => 'text', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => 'link_type:is(custom_link)', 'operator' => 'and', 'choices' => '')))));
        ot_register_meta_box($my_meta_box);
    }
    //if( function_exists( 'ot_get_option' ) ):
}
Пример #20
0
 static function init()
 {
     if (!Bw_woo::$enable) {
         return;
     }
     $settings = array('id' => 'settings_product', 'title' => 'Product settings', 'pages' => array('product'), 'context' => 'side', 'priority' => 'high', 'class' => '', 'fields' => array());
     ot_register_meta_box($settings);
 }
Пример #21
0
 function ct_product_meta_boxes()
 {
     //layout
     $meta_box2 = array('id' => 'product_layout', 'title' => 'Layout settings', 'desc' => '', 'pages' => array('product'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('id' => 'product-sidebar', 'label' => __('Sidebar', 'cactusthemes'), 'desc' => __('Select "Default" to use settings in Theme Options', 'cactusthemes'), 'std' => '', 'type' => 'select', 'class' => '', 'choices' => array(array('value' => 0, 'label' => 'Default', 'src' => ''), array('value' => 'left', 'label' => 'Left', 'src' => ''), array('value' => 'right', 'label' => 'Right', 'src' => ''), array('value' => 'full', 'label' => 'Hidden', 'src' => ''))), array('id' => 'product-ctpadding', 'label' => __('Content Padding', 'cactusthemes'), 'desc' => __('Enable default top and bottom padding for content (30px)', 'cactusthemes'), 'std' => 'on', 'type' => 'on-off', 'class' => '', 'choices' => array())));
     if (function_exists('ot_register_meta_box')) {
         ot_register_meta_box($meta_box2);
     }
 }
function landx_squzee_meta_boxes()
{
    if (function_exists('ot_get_option')) {
        $my_meta_box = array('id' => 'landx_squzee_meta_box', 'title' => 'Landx Squzee Template Settings', 'desc' => 'This option only applicable when you select Squzee Template', 'pages' => array('page'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('id' => 'squzee_header_logo_display', 'label' => __('Header logo display', THEMENAME), 'desc' => '', 'std' => 'on', 'type' => 'on-off', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'squzee_header_logo', 'label' => __('Header logo', THEMENAME), 'desc' => '', 'std' => THEMEURI . '/images/logo.png', 'type' => 'upload', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => 'squzee_header_logo_display:is(on)', 'operator' => 'and'), array('id' => 'squzee_social_button_display', 'label' => __('Social link display', THEMENAME), 'desc' => '', 'std' => 'on', 'type' => 'on-off', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and')));
        ot_register_meta_box($my_meta_box);
    }
    //if( function_exists( 'ot_get_option' ) ):
}
Пример #23
0
 /**
  * Register Meta Boxes
  *
  * @since 1.0.0
  */
 public function wpl_toolskit_documents_meta_boxes()
 {
     /*-----------------------------------------------------------
     		Custom meta box for Documents
     	-----------------------------------------------------------*/
     $documents_meta_box = array('id' => 'documents_meta_box', 'title' => __('Document Options', 'charitylife-toolskit'), 'desc' => '', 'pages' => array('post_documents'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('label' => __('Sidebar Position', 'charitylife-toolskit'), 'id' => 'wpl_cpt_sidebar_position', 'type' => 'select', 'desc' => __('Select the sidebar position. Chose No Sidebar for Full width page.', 'charitylife-toolskit'), 'choices' => array(array('label' => __('Left', 'charitylife-toolskit'), 'value' => 'left'), array('label' => __('Right', 'charitylife-toolskit'), 'value' => 'right'), array('label' => __('No Sidebar', 'charitylife-toolskit'), 'value' => 'disable')), 'std' => 'right', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => ''), array('label' => __('Select Sidebar', 'charitylife-toolskit'), 'id' => 'wpl_cpt_sidebar_select', 'type' => 'sidebar-select', 'desc' => __('Select a Sidebar', 'charitylife-toolskit'), 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => ''), array('label' => __('Document File', 'charitylife-toolskit'), 'desc' => __('Upload the file. (The file must have the .pdf extension.)', 'charitylife-toolskit'), 'id' => 'wpl_document_file', 'type' => 'upload', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => ''), array('label' => __('File size', 'charitylife-toolskit'), 'desc' => __('The file size. (For ex: 1.45MB)', 'charitylife-toolskit'), 'id' => 'wpl_document_file_size', 'type' => 'text', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => ''), array('label' => __('Document Pages', 'charitylife-toolskit'), 'desc' => __('Document Pages (For ex: 220 Pages)', 'charitylife-toolskit'), 'id' => 'wpl_document_pages', 'type' => 'text', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => '')));
     ot_register_meta_box($documents_meta_box);
 }
Пример #24
0
 function ct_page_meta_boxes()
 {
     $page_meta_box = array('id' => 'page_meta_box', 'title' => 'Page Settings', 'desc' => '', 'pages' => array('page'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('id' => 'sidebar', 'label' => __('Sidebar', 'cactusthemes'), 'desc' => __('Main Sidebar appearance', 'cactusthemes'), 'std' => '', 'type' => 'select', 'class' => '', 'choices' => array(array('value' => '', 'label' => 'Default', 'src' => ''), array('value' => 'left', 'label' => 'Left Sidebar', 'src' => ''), array('value' => 'right', 'label' => 'Right Sidebar', 'src' => ''), array('value' => 'full', 'label' => 'No Sidebar', 'src' => ''))), array('id' => 'background', 'label' => __('Background', 'cactusthemes'), 'desc' => __('If used with Page Template "Front Page" and Header Style is "Sidebar" or "Classy", this will be header background', 'cactusthemes'), 'std' => '', 'type' => 'background')));
     ot_register_meta_box($page_meta_box);
     //front page metabox
     $front_meta_box = array('id' => 'front_meta_box', 'title' => 'Front Page Settings', 'desc' => '', 'pages' => array('page'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('id' => 'header_style', 'label' => __('Header Stye', 'cactusthemes'), 'desc' => __('Only use with Page template "Front Page"', 'cactusthemes'), 'std' => '', 'type' => 'select', 'class' => '', 'choices' => array(array('value' => 0, 'label' => 'Default', 'src' => ''), array('value' => 'carousel', 'label' => 'Big Carousel', 'src' => ''), array('value' => 'metro', 'label' => 'Metro Carousel', 'src' => ''), array('value' => 'classy', 'label' => 'Classy Slider', 'src' => ''), array('value' => 'classy2', 'label' => 'Classy Slider 2', 'src' => ''), array('value' => 'classy3', 'label' => 'Classy Slider 3', 'src' => ''), array('value' => 'amazing', 'label' => 'Amazing Slider', 'src' => ''), array('value' => 'video_slider', 'label' => 'Video Slider', 'src' => ''), array('value' => 'sidebar', 'label' => 'Sidebar', 'src' => ''))), array('id' => 'header_home_postids', 'label' => 'Header - Items IDs', 'desc' => 'Include post IDs to show on Header of Front Page', 'std' => '', 'type' => 'text', 'section' => 'home', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => ''), array('id' => 'header_home_condition', 'label' => 'Header - Condition', 'desc' => 'Select condition to query post on Header of Front Page', 'std' => '', 'type' => 'select', 'section' => 'home', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'choices' => array(array('value' => 0, 'label' => 'Default', 'src' => ''), array('value' => 'latest', 'label' => 'Lastest', 'src' => ''), array('value' => 'most_viewed', 'label' => 'Most Viewed', 'src' => ''), array('value' => 'most_comments', 'label' => 'Most Comments', 'src' => ''), array('value' => 'most_liked', 'label' => 'Most liked', 'src' => ''), array('value' => 'title', 'label' => 'Title', 'src' => ''), array('value' => 'modified', 'label' => 'Modified', 'src' => ''), array('value' => 'random', 'label' => 'Random', 'src' => ''))), array('id' => 'header_home_cat', 'label' => 'Header - Category (ID or slug)', 'desc' => 'Include Category ID, slug to show on Header Home section (Ex: 15,26,37 or foo,bar,jazz)', 'std' => '', 'type' => 'text', 'section' => 'home', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => ''), array('id' => 'header_home_tag', 'label' => 'Header - Items Tags', 'desc' => 'Include Tags to show on Header Home section (Ex: foo,bar)', 'std' => '', 'type' => 'text', 'section' => 'home', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => ''), array('id' => 'header_home_order', 'label' => 'Header - Items Order', 'desc' => '', 'std' => '', 'type' => 'select', 'section' => 'home', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'choices' => array(array('value' => 0, 'label' => 'Default', 'src' => ''), array('value' => 'desc', 'label' => 'DESC', 'src' => ''), array('value' => 'asc', 'label' => 'ASC', 'src' => ''))), array('id' => 'header_home_number', 'label' => 'Header - Number of Items', 'desc' => 'Adjust this value to have best layout that fits screen', 'std' => '', 'type' => 'text', 'section' => 'home', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '')));
     ot_register_meta_box($front_meta_box);
 }
Пример #25
0
 function ct_page_meta_boxes()
 {
     //layout
     $page_meta_box_layout = array('id' => 'page_layout', 'title' => 'Layout settings', 'desc' => '', 'pages' => array('page'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('id' => 'sidebar_layout', 'label' => __('Sidebar', 'cactusthemes'), 'desc' => __('Select "Default" to use settings in Theme Options or Front page fullwidth', 'cactusthemes'), 'std' => '', 'type' => 'select', 'class' => '', 'choices' => array(array('value' => 0, 'label' => 'Default', 'src' => ''), array('value' => 'left', 'label' => 'Left', 'src' => ''), array('value' => 'right', 'label' => 'Right', 'src' => ''), array('value' => 'full', 'label' => 'Hidden', 'src' => ''))), array('id' => 'content_padding', 'label' => __('Content Padding', 'cactusthemes'), 'desc' => __('Enable default top and bottom padding for content (30px)', 'cactusthemes'), 'std' => 'on', 'type' => 'on-off', 'class' => '', 'choices' => array())));
     ot_register_meta_box($page_meta_box_layout);
     //front page
     $page_meta_front = array('id' => 'front_page_header', 'title' => 'Front Page Header Settings', 'desc' => '', 'pages' => array('page'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('id' => 'header_background_style', 'label' => __('Header Background', 'cactusthemes'), 'desc' => __('Choose type of header background (Drag a widget into Front Page Sidebar for Custom content)', 'cactusthemes'), 'std' => '', 'type' => 'select', 'class' => 'u-condition', 'choices' => array(array('value' => 'img', 'label' => 'Background Image', 'src' => ''), array('value' => 'rev', 'label' => 'Revolution Slider', 'src' => ''), array('value' => 'sidebar', 'label' => 'Custom Content', 'src' => ''))), array('id' => 'header_background_image', 'label' => __('Background Image', 'cactusthemes'), 'desc' => __('Choose background image', 'cactusthemes'), 'std' => '', 'type' => 'background', 'class' => 'header_background_style-child header_background_style-img', 'choices' => array()), array('id' => 'header_background_rev', 'label' => __('Revolution Slider', 'cactusthemes'), 'desc' => __('Enter Revolution Slider Alias Name', 'cactusthemes'), 'std' => '', 'type' => 'text', 'class' => 'header_background_style-child header_background_style-rev', 'choices' => array()), array('id' => 'header_background_rev_style', 'label' => __('Enable University Style for Revolution Slider', 'cactusthemes'), 'desc' => __('Enable to apply University slider\'s navigation & layer style', 'cactusthemes'), 'std' => 'off', 'type' => 'on-off', 'class' => 'header_background_style-child header_background_style-rev', 'choices' => array()), array('id' => 'header_custom_height', 'label' => __('Header Custom Height', 'cactusthemes'), 'desc' => __('(Optional) Enter custom height (number of pixel, ex: 400)', 'cactusthemes'), 'std' => '', 'type' => 'text', 'class' => ''), array('id' => 'header_content_style', 'label' => __('Overlay content', 'cactusthemes'), 'desc' => __('Enable overlay content', 'cactusthemes'), 'std' => '', 'type' => 'select', 'class' => 'u-condition', 'choices' => array(array('value' => '0', 'label' => __('None', 'cactusthemes'), 'src' => ''), array('value' => 'scroller', 'label' => __('Post Scroller', 'cactusthemes'), 'src' => ''), array('value' => 'carousel', 'label' => __('Post Carousel', 'cactusthemes'), 'src' => ''))), array('id' => 'header_content_posttype', 'label' => __('Post type', 'cactusthemes'), 'desc' => __('Choose Post Type for Overlay Content', 'cactusthemes'), 'std' => '', 'type' => 'select', 'class' => 'header_content_style-child header_content_style-scroller header_content_style-carousel', 'choices' => array(array('value' => 'post', 'label' => __('Post', 'cactusthemes'), 'src' => ''), array('value' => 'u_event', 'label' => __('Event', 'cactusthemes'), 'src' => ''), array('value' => 'u_course', 'label' => __('Course', 'cactusthemes'), 'src' => ''), array('value' => 'sfwd-courses', 'label' => __('LearnDash Course', 'cactusthemes'), 'src' => ''))), array('id' => 'header_content_cat', 'label' => __('Category', 'cactusthemes'), 'desc' => __('List of cat ID (or slug), separated by a comma (for Overlay Content)', 'cactusthemes'), 'std' => '', 'type' => 'text', 'class' => 'header_content_style-child header_content_style-scroller header_content_style-carousel', 'choices' => array()), array('id' => 'header_content_tag', 'label' => __('Tags', 'cactusthemes'), 'desc' => __('List of tags, separated by a comma (for Overlay Content)', 'cactusthemes'), 'std' => '', 'type' => 'text', 'class' => 'header_content_style-child header_content_style-scroller header_content_style-carousel', 'choices' => array()), array('id' => 'header_content_ids', 'label' => __('IDs', 'cactusthemes'), 'desc' => __('Specify post IDs to retrieve (for Overlay Content)', 'cactusthemes'), 'std' => '', 'type' => 'text', 'class' => 'header_content_style-child header_content_style-scroller header_content_style-carousel', 'choices' => array()), array('id' => 'header_content_count', 'label' => __('Count', 'cactusthemes'), 'desc' => __('Number of posts to show (for Overlay Content)', 'cactusthemes'), 'std' => '', 'type' => 'text', 'class' => 'header_content_style-child header_content_style-scroller header_content_style-carousel', 'choices' => array()), array('id' => 'header_content_visible', 'label' => __('Visible items', 'cactusthemes'), 'desc' => __('Number of items visible in Carousel. Default is 4 (for Overlay Content)', 'cactusthemes'), 'std' => '', 'type' => 'text', 'class' => 'header_content_style-child header_content_style-carousel', 'choices' => array()), array('id' => 'header_content_order', 'label' => __('Order', 'cactusthemes'), 'desc' => __('', 'cactusthemes'), 'std' => '', 'type' => 'select', 'class' => 'header_content_style-child header_content_style-scroller header_content_style-carousel', 'choices' => array(array('value' => 'DESC', 'label' => __('DESC', 'cactusthemes'), 'src' => ''), array('value' => 'ASC', 'label' => __('ASC', 'cactusthemes'), 'src' => ''))), array('id' => 'header_content_orderby', 'label' => __('Order by', 'cactusthemes'), 'desc' => __('', 'cactusthemes'), 'std' => '', 'type' => 'select', 'class' => 'header_content_style-child header_content_style-scroller header_content_style-carousel', 'choices' => array(array('value' => 'date', 'label' => __('Date', 'cactusthemes'), 'src' => ''), array('value' => 'ID', 'label' => __('ID', 'cactusthemes'), 'src' => ''), array('value' => 'author', 'label' => __('Author', 'cactusthemes'), 'src' => ''), array('value' => 'title', 'label' => __('Title', 'cactusthemes'), 'src' => ''), array('value' => 'name', 'label' => __('Name', 'cactusthemes'), 'src' => ''), array('value' => 'modified', 'label' => __('Modified', 'cactusthemes'), 'src' => ''), array('value' => 'parent', 'label' => __('Parent', 'cactusthemes'), 'src' => ''), array('value' => 'rand', 'label' => __('Random', 'cactusthemes'), 'src' => ''), array('value' => 'comment_count', 'label' => __('Comment count', 'cactusthemes'), 'src' => ''), array('value' => 'menu_order', 'label' => __('Menu order', 'cactusthemes'), 'src' => ''), array('value' => 'meta_value', 'label' => __('Meta value', 'cactusthemes'), 'src' => ''), array('value' => 'meta_value_num', 'label' => __('Meta value num', 'cactusthemes'), 'src' => ''), array('value' => 'post__in', 'label' => __('Post__in', 'cactusthemes'), 'src' => ''), array('value' => 'none', 'label' => __('None', 'cactusthemes'), 'src' => ''))), array('id' => 'header_content_meta_key', 'label' => __('Meta key', 'cactusthemes'), 'desc' => __('Name of meta key for ordering (for Overlay Content)', 'cactusthemes'), 'std' => '', 'type' => 'text', 'class' => 'header_content_style-child header_content_style-scroller header_content_style-carousel', 'choices' => array()), array('id' => 'header_content_show_date', 'label' => __('Show date', 'cactusthemes'), 'desc' => __('Show date info. With standard posts, this is Published Date. With Event and Course, this is Start Date', "cactustheme"), 'std' => '', 'type' => 'select', 'class' => 'header_content_style-child header_content_style-carousel', 'choices' => array(array('value' => '1', 'label' => __('Show', 'cactusthemes'), 'src' => ''), array('value' => 'hide', 'label' => __('Hide', 'cactusthemes'), 'src' => ''))), array('id' => 'header_content_show_price', 'label' => __('Show price', 'cactusthemes'), 'desc' => __('', "cactustheme"), 'std' => '', 'type' => 'select', 'class' => 'header_content_style-child header_content_style-carousel', 'choices' => array(array('value' => '1', 'label' => __('Show', 'cactusthemes'), 'src' => ''), array('value' => 'hide', 'label' => __('Hide', 'cactusthemes'), 'src' => ''))), array('id' => 'header_content_show_venue', 'label' => __('Show Venue', 'cactusthemes'), 'desc' => __('Show Venue with Event & Course post type, or Show Author for Standard post', "cactustheme"), 'std' => '', 'type' => 'select', 'class' => 'header_content_style-child header_content_style-carousel', 'choices' => array(array('value' => '1', 'label' => __('Show', 'cactusthemes'), 'src' => ''), array('value' => 'hide', 'label' => __('Hide', 'cactusthemes'), 'src' => ''))), array('id' => 'header_content_show_time', 'label' => __('Show Time', 'cactusthemes'), 'desc' => __('Show start time. Only works with Event & Course post type', "cactustheme"), 'std' => '', 'type' => 'select', 'class' => 'header_content_style-child header_content_style-carousel', 'choices' => array(array('value' => '1', 'label' => __('Show', 'cactusthemes'), 'src' => ''), array('value' => 'hide', 'label' => __('Hide', 'cactusthemes'), 'src' => ''))), array('id' => 'header_content_link_text', 'label' => __('"More" text', 'cactusthemes'), 'desc' => __('Default is "MORE NEWS"', 'cactusthemes'), 'std' => '', 'type' => 'text', 'class' => 'header_content_style-child header_content_style-scroller', 'choices' => array()), array('id' => 'header_content_link_url', 'label' => __('"More" link', 'cactusthemes'), 'desc' => __('If not set, this button is not shown', 'cactusthemes'), 'std' => '', 'type' => 'text', 'class' => 'header_content_style-child header_content_style-scroller', 'choices' => array())));
     ot_register_meta_box($page_meta_front);
 }
Пример #26
0
function landx_meta_boxes()
{
    global $wpdb, $post;
    if (function_exists('ot_get_option')) {
        $my_meta_box = array('id' => 'landx_meta_box', 'title' => 'Landx page Settings', 'desc' => '', 'pages' => array('page'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('id' => 'header_settings', 'label' => 'Header settings', 'type' => 'tab', 'operator' => 'and'), array('id' => 'custom_title', 'label' => 'Custom Title', 'desc' => '', 'std' => 'off', 'type' => 'on-off', 'class' => '', 'choices' => array(), 'condition' => '', 'operator' => 'and'), array('id' => 'title', 'label' => 'Title', 'desc' => '', 'std' => '', 'type' => 'text', 'class' => '', 'choices' => array(), 'operator' => 'and', 'condition' => 'custom_title:is(on)'), array('id' => 'subtitle', 'label' => 'Sub-title', 'desc' => '', 'std' => '', 'type' => 'text', 'class' => '', 'rows' => 3, 'choices' => array(), 'operator' => 'and', 'condition' => 'custom_title:is(on)'), array('id' => 'header_bg', 'label' => 'Custom header Background', 'desc' => '', 'std' => 'off', 'type' => 'on-off', 'class' => '', 'choices' => array(), 'operator' => 'and', 'condition' => ''), array('id' => 'custom__header_bg', 'label' => 'Background', 'desc' => '', 'std' => '', 'type' => 'upload', 'class' => '', 'choices' => array(), 'operator' => 'and', 'condition' => 'header_bg:is(on)'), array('id' => 'content_tab', 'label' => 'Layout settings', 'type' => 'tab', 'operator' => 'and'), array('id' => 'page_layout', 'label' => __('Default layout', THEMENAME), 'desc' => '', 'std' => 'rs', 'type' => 'radio-image', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => 'full', 'label' => __('Full width', THEMENAME), 'src' => OT_URL . '/assets/images/layout/full-width.png'), array('value' => 'ls', 'label' => __('Left sidebar', THEMENAME), 'src' => OT_URL . '/assets/images/layout/left-sidebar.png'), array('value' => 'rs', 'label' => __('Right sidebar', THEMENAME), 'src' => OT_URL . '/assets/images/layout/right-sidebar.png'))), array('id' => 'sidebar', 'label' => 'Select sidebar', 'desc' => '', 'std' => 'sidebar-1', 'type' => 'sidebar-select', 'class' => '', 'choices' => array(), 'operator' => 'and', 'condition' => 'page_layout:not(full)'), array('id' => 'one_page__settings', 'label' => 'One page settings', 'type' => 'tab', 'operator' => 'and'), array('id' => 'display_page_title', 'label' => 'Display page title in one-page', 'desc' => '', 'std' => 'on', 'type' => 'on-off', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => ''), array('id' => 'content_alignment', 'label' => 'Title/content alignment', 'desc' => '', 'std' => 'left', 'type' => 'select', 'class' => '', 'rows' => '', 'choices' => array(array('value' => 'left', 'label' => 'Left', 'src' => ''), array('value' => 'center', 'label' => 'Center', 'src' => '')), 'operator' => 'and', 'condition' => ''), array('id' => 'image_position', 'label' => 'Featured Image Position', 'desc' => '', 'std' => 'right', 'type' => 'select', 'class' => '', 'rows' => '', 'choices' => array(array('value' => 'left', 'label' => 'Left', 'src' => ''), array('value' => 'right', 'label' => 'Right', 'src' => '')), 'operator' => 'and', 'condition' => ''), array('id' => 'jump_button', 'label' => __('Quick jumpto button', THEMENAME), 'desc' => 'Display after this page content.', 'std' => 'off', 'type' => 'on-off', 'operator' => 'and'), array('id' => 'buttons', 'label' => __('Add new button', THEMENAME), 'desc' => '', 'std' => '', 'type' => 'list-item', 'section' => 'header_options', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => 'jump_button:is(on)', 'operator' => 'and', 'settings' => array(array('id' => 'button_type', 'label' => 'Button type', 'desc' => '', 'std' => 'standard-button', 'type' => 'select', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => 'standard-button', 'label' => 'Standard button', 'src' => ''), array('value' => 'secondary-button-white', 'label' => 'Standard button white', 'src' => ''))), array('id' => 'link_type', 'label' => 'Link type', 'desc' => '', 'std' => 'inner', 'type' => 'select', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => 'inner', 'label' => 'Inner this page', 'src' => ''), array('value' => 'external', 'label' => 'Outside of this page', 'src' => ''), array('value' => 'customlink', 'label' => 'Custom link', 'src' => ''))), array('id' => 'custom_url', 'label' => 'Custom_url', 'desc' => '', 'std' => '#', 'type' => 'text', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => 'link_type:is(customlink)', 'operator' => 'and', 'choices' => ''), array('id' => 'page_id', 'label' => 'Select a page', 'desc' => '', 'std' => '', 'type' => 'page-select', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => 'link_type:not(customlink)', 'operator' => 'and', 'choices' => ''))), array('id' => 'bg_style', 'label' => 'Background style', 'desc' => '', 'std' => 'dark', 'type' => 'select', 'class' => '', 'rows' => '', 'choices' => array(array('value' => 'dark', 'label' => 'Dark', 'src' => ''), array('value' => 'light', 'label' => 'Light', 'src' => '')), 'operator' => 'and', 'condition' => ''), array('id' => 'background', 'label' => 'Background image', 'desc' => '', 'std' => THEMEURI . '/images/bg-image-1.jpg', 'type' => 'upload', 'class' => '', 'choices' => array(), 'operator' => 'and', 'condition' => ''), array('id' => 'form_display', 'label' => 'subscription-form display', 'desc' => '', 'std' => 'on', 'type' => 'on-off', 'class' => '', 'choices' => array(), 'condition' => '', 'operator' => 'and'), array('id' => 'form_select_option', 'label' => 'Select a subscription form', 'desc' => '', 'std' => 'mailchimp', 'type' => 'select', 'class' => '', 'choices' => array(array('value' => 'mailchimp', 'label' => 'Mailchimp', 'src' => ''), array('value' => 'contactform', 'label' => 'Contact form 7', 'src' => '')), 'condition' => 'form_display:is(on)', 'operator' => 'and'), array('id' => 'form_position', 'label' => 'subscription-form display position', 'desc' => '', 'std' => 'right', 'type' => 'select', 'class' => '', 'choices' => array(array('value' => 'right', 'label' => 'Right', 'src' => ''), array('value' => 'bottom', 'label' => 'Bottom', 'src' => '')), 'condition' => 'form_display:is(on)', 'operator' => 'and'), array('id' => 'contact_form_shortcode', 'label' => 'Contact form 7 shortcode', 'desc' => 'Need to active contact form 7 plugin and then add a shortcode here.', 'std' => '', 'type' => 'text', 'class' => '', 'choices' => array(), 'condition' => 'form_display:is(on),form_select_option:is(contactform)', 'operator' => 'and'), array('id' => 'form_title', 'label' => 'Form title', 'desc' => '', 'std' => '', 'type' => 'text', 'class' => '', 'choices' => array(), 'condition' => 'form_display:is(on),form_select_option:is(mailchimp)', 'operator' => 'and'), array('id' => 'form_type', 'label' => 'Form type', 'desc' => 'Only horizontal and vertical form is available.', 'std' => 'vertical', 'type' => 'select', 'class' => '', 'choices' => array(array('value' => 'vertical', 'label' => 'Vertical', 'src' => ''), array('value' => 'horizontal', 'label' => 'Horizontal', 'src' => '')), 'condition' => 'form_display:is(on),form_select_option:is(mailchimp)', 'operator' => 'and'), array('id' => 'form_field_settings', 'label' => 'Form field settings', 'desc' => '', 'std' => 'off', 'type' => 'on-off', 'class' => '', 'choices' => array(), 'condition' => 'form_display:is(on),form_select_option:is(mailchimp)', 'operator' => 'and'), array('id' => 'name_placeholder', 'label' => 'Default text in name field', 'desc' => '', 'std' => 'Your Name', 'type' => 'text', 'class' => '', 'choices' => array(), 'condition' => 'form_display:is(on),form_field_settings:is(on),form_type:is(vertical),form_select_option:is(mailchimp)', 'operator' => 'and'), array('id' => 'email_placeholder', 'label' => 'Default text in email field', 'desc' => '', 'std' => 'Your Email', 'type' => 'text', 'class' => '', 'choices' => array(), 'condition' => 'form_display:is(on),form_field_settings:is(on),form_select_option:is(mailchimp)', 'operator' => 'and'), array('id' => 'phone_placeholder', 'label' => 'Default text in Phone field', 'desc' => '', 'std' => 'Phone number', 'type' => 'text', 'class' => '', 'choices' => array(), 'condition' => 'form_display:is(on),form_field_settings:is(on),form_type:is(vertical),form_select_option:is(mailchimp)', 'operator' => 'and'), array('id' => 'form_submit_button_text', 'label' => 'Submit button text', 'desc' => '', 'std' => 'GET STARTED', 'type' => 'text', 'class' => '', 'choices' => array(), 'condition' => 'form_display:is(on),form_field_settings:is(on),form_select_option:is(mailchimp)', 'operator' => 'and'), array('id' => 'one_page__animation', 'label' => 'One page animation', 'type' => 'tab', 'operator' => 'and'), array('id' => 'title_animation', 'label' => 'Title animation', 'desc' => '', 'std' => '', 'type' => 'select', 'class' => '', 'choices' => landx_animation_select(), 'condition' => '', 'operator' => 'and'), array('id' => 'content_animation', 'label' => 'Content animation', 'desc' => '', 'std' => '', 'type' => 'select', 'class' => '', 'choices' => landx_animation_select(), 'condition' => '', 'operator' => 'and'), array('id' => 'featured_image_animation', 'label' => 'Featured image animation', 'desc' => '', 'std' => '', 'type' => 'select', 'class' => '', 'choices' => landx_animation_select(), 'condition' => '', 'operator' => 'and'), array('id' => 'form_animation', 'label' => 'Subscription form animation', 'desc' => '', 'std' => '', 'type' => 'select', 'class' => '', 'choices' => landx_animation_select(), 'condition' => '', 'operator' => 'and'), array('id' => 'button_animation', 'label' => 'Quick jump button animation', 'desc' => '', 'std' => '', 'type' => 'select', 'class' => '', 'choices' => landx_animation_select(), 'condition' => '', 'operator' => 'and')));
        ot_register_meta_box($my_meta_box);
    }
    //if( function_exists( 'ot_get_option' ) ):
}
Пример #27
0
/**
 * Meta Boxes demo code.
 *
 * You can find all the available option types in theme-options.php.
 *
 * @return    void
 * @since     2.3.0
 */
function ST_Pages_meta_boxes()
{
    $Page_Title_Bar_Height = ot_get_option('Page_Title_Bar_Height');
    if (!empty($Page_Title_Bar_Height)) {
        $Page_Title_Bar_Height = array('0' => $Page_Title_Bar_Height['0'], '1' => $Page_Title_Bar_Height['1']);
    }
    $Display_Custom_Background = ot_get_option('Display_Custom_Background');
    if (!empty($Display_Custom_Background)) {
        $Display_Custom_Background = $Display_Custom_Background;
    }
    $page_title_bar = ot_get_option('page_title_bar');
    $title_background_page = ot_get_option('Title_Background');
    if (!empty($title_background_page)) {
        $title_background_page = array('background-color' => $title_background_page['background-color'], 'background-repeat' => $title_background_page['background-repeat'], 'background-attachment' => $title_background_page['background-attachment'], 'background-position' => $title_background_page['background-position'], 'background-size' => $title_background_page['background-size'], 'background-image' => $title_background_page['background-image']);
    }
    $Heading_Color = ot_get_option('Heading_Color');
    $Text_Color = ot_get_option('Text_Color');
    $header_bg = ot_get_option('bg_header');
    if (!empty($header_bg)) {
        $header_bg = array('background-color' => $header_bg['background-color'], 'background-repeat' => $header_bg['background-repeat'], 'background-attachment' => $header_bg['background-attachment'], 'background-position' => $header_bg['background-position'], 'background-size' => $header_bg['background-size'], 'background-image' => $header_bg['background-image']);
    }
    $header_border_top = ot_get_option('header_border_top');
    if (!empty($header_border_top)) {
        $header_border_top_width = $header_border_top['width'] ? $header_border_top['width'] : ' ';
        $header_border_top_unit = $header_border_top['unit'] ? $header_border_top['unit'] : ' ';
        $header_border_top_style = $header_border_top['style'] ? $header_border_top['style'] : ' ';
        $header_border_top_color = $header_border_top['color'] ? $header_border_top['color'] : ' ';
    }
    $header_border_bottom = ot_get_option('header_border_bottom');
    if (!empty($header_border_bottom)) {
        $header_border_bottom = array('width' => $header_border_bottom['width'], 'unit' => $header_border_bottom['unit'], 'style' => $header_border_bottom['style'], 'color' => $header_border_bottom['color']);
    }
    $Display_Header_Top = ot_get_option('header_top');
    if ($Display_Header_Top == 'show') {
        $Display_Header_Top = 'on';
    } else {
        $Display_Header_Top = 'off';
    }
    $Transparent_Header = ot_get_option('Transparent_Header');
    $menu_font_size = ot_get_option('menu_font_size');
    $bg_body = ot_get_option('bg_body');
    if (!empty($bg_body)) {
        $bg_body = array('background-color' => $bg_body['background-color'], 'background-repeat' => $bg_body['background-repeat'], 'background-attachment' => $bg_body['background-attachment'], 'background-position' => $bg_body['background-position'], 'background-size' => $bg_body['background-size'], 'background-image' => $bg_body['background-image']);
    }
    /**
     * Create a custom meta boxes array that we pass to 
     * the OptionTree Meta Box API Class.
     */
    $ST_Pages_meta_boxes = array('id' => 'SimThemes_meta_box', 'title' => __('ST Options', 'SimThemes'), 'desc' => '', 'pages' => array('page'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('label' => __('Slider or Featured Section', 'SimThemes'), 'id' => 'slider-featured-section', 'type' => 'tab'), array('label' => __('Show Slider or Featured Area Section', 'SimThemes'), 'id' => 'show_or_hide_slider_featured', 'type' => 'on-off', 'desc' => sprintf(__('Shows the Show Slider or Featured Area Section when set to %s.', 'SimThemes'), '<code>on</code>'), 'std' => 'off'), array('id' => 'select_featured_section_or_slider', 'label' => __('Choice Featured Section or Slider Section', 'SimThemes'), 'desc' => __('Please select it according to your need.', 'SimThemes'), 'std' => 'slider', 'type' => 'radio', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => 'show_or_hide_slider_featured:is(on),show_or_hide_slider_featured:not()', 'operator' => 'and', 'choices' => array(array('value' => 'featured', 'label' => __('Featured Section', 'SimThemes'), 'src' => ''), array('value' => 'slider', 'label' => __('Slider Section', 'SimThemes'), 'src' => ''))), array('label' => __('Slider Shortcode', 'SimThemes'), 'id' => 'select_slider', 'desc' => __('Please provide you slider shortcode here.', 'SimThemes'), 'type' => 'text', 'section' => 'option_types', 'rows' => '', 'post_type' => 'slider', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => 'show_or_hide_slider_featured:is(on),show_or_hide_slider_featured:not()', 'operator' => 'and'), array('label' => __('Featured Area Title', 'SimThemes'), 'id' => 'featured_title', 'type' => 'text', 'section' => 'option_types', 'rows' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => 'show_or_hide_slider_featured:is(on),show_or_hide_slider_featured:not()', 'operator' => 'and'), array('label' => __('Featured Area Title Size', 'SimThemes'), 'id' => 'featured_size', 'type' => 'text', 'section' => 'option_types', 'rows' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => 'show_or_hide_slider_featured:is(on),show_or_hide_slider_featured:not()', 'operator' => 'and'), array('label' => __('Featured Area Title Color', 'SimThemes'), 'id' => 'featured_title_color', 'type' => 'colorpicker', 'section' => 'option_types', 'rows' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => 'show_or_hide_slider_featured:is(on),show_or_hide_slider_featured:not()', 'operator' => 'and'), array('label' => __('Featured Area Text', 'SimThemes'), 'id' => 'featured_text', 'type' => 'textarea', 'section' => 'option_types', 'rows' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => 'show_or_hide_slider_featured:is(on),show_or_hide_slider_featured:not()', 'operator' => 'and'), array('label' => __('Featured Area Height', 'SimThemes'), 'id' => 'featured_height', 'desc' => __('Please use px at the end', 'SimThemes'), 'type' => 'text', 'section' => 'option_types', 'rows' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => 'show_or_hide_slider_featured:is(on),show_or_hide_slider_featured:not()', 'operator' => 'and'), array('label' => __('Page', 'SimThemes'), 'id' => 'page', 'type' => 'tab'), array('id' => 'enable_page_comments', 'label' => __('Enable Comments', 'SimThemes'), 'desc' => __('Globally Enable or Disable Comments on Pages. <span style="color:#690;">Default status is off.</span>', 'SimThemes'), 'std' => 'off', 'type' => 'on_off', 'choices' => array($the_array[] = array('value' => 'on', 'label' => __('On', 'SimThemes')), array('value' => 'off', 'label' => __('off', 'SimThemes'))), 'section' => 'option_types'), array('id' => 'sidebar', 'label' => __('Sidebar Position', 'SimThemes'), 'desc' => __('Please select the sidebar position', 'SimThemes'), 'std' => 'no', 'type' => 'select', 'choices' => array($the_array[] = array('value' => 'no', 'label' => __('No Sidebar', 'SimThemes')), array('value' => 'left', 'label' => __('Left Sidebar', 'SimThemes')), array('value' => 'right', 'label' => __('Right Sidebar', 'SimThemes'))), 'section' => 'option_types'), array('id' => 'sidebar_select', 'label' => __('Sidebar Select', 'theme-text-domain'), 'desc' => '<p>' . sprintf(__('Please select the sidebar you want to view here.', 'SimThemes'), '<code>footer-sidebar-$i</code>') . '</p>', 'std' => 'sidebar1', 'type' => 'sidebar-select', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('label' => __('Page Content Top Margin', 'SimThemes'), 'id' => 'page_margin_top', 'type' => 'text', 'desc' => __('In pixels ex: 20px. Leave empty for default value.', 'SimThemes'), 'std' => '40px'), array('label' => __('Page Content Bottom Margin', 'SimThemes'), 'id' => 'page_margin_bottom', 'type' => 'text', 'desc' => __('In pixels ex: 20px. Leave empty for default value.', 'SimThemes'), 'std' => '40px'), array('label' => __('Page Content Top Padding', 'SimThemes'), 'id' => 'page_padding_top', 'type' => 'text', 'desc' => __('In pixels ex: 10px. Leave empty for default value.', 'SimThemes'), 'std' => '10px'), array('label' => __('Page Content Bottom Padding', 'SimThemes'), 'id' => 'page_padding_bottom', 'type' => 'text', 'desc' => __('In pixels ex: 10px. Leave empty for default value.', 'SimThemes'), 'std' => '10px'), array('label' => __('Header', 'SimThemes'), 'id' => 'header', 'type' => 'tab'), array('id' => 'Display_Header', 'label' => __('Display Header', 'SimThemes'), 'desc' => __('Choose to show or hide the header.', 'SimThemes'), 'type' => 'on-off', 'std' => 'on'), array('id' => 'Transparent_Header', 'label' => __('Transparent Header', 'SimThemes'), 'desc' => __('', 'SimThemes'), 'std' => $Transparent_Header, 'type' => 'on-off', 'section' => 'option_types', 'condition' => 'Display_Header:is(on),Display_Header:not()'), array('id' => 'header_border_top', 'label' => __('Header Border Top', 'simthemes'), 'desc' => __('', 'simthemes'), 'type' => 'border', 'section' => 'option_types', 'std' => array('width' => $header_border_top_width, 'unit' => $header_border_top_unit, 'style' => $header_border_top_style, 'color' => $header_border_top_color), 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'condition' => 'Display_Header:is(on),Display_Header:not()'), array('id' => 'header_border_bottom', 'label' => __('Header Border Bottom', 'simthemes'), 'desc' => __('', 'simthemes'), 'type' => 'border', 'section' => 'option_types', 'std' => $header_border_bottom, 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'condition' => 'Display_Header:is(on),Display_Header:not()'), array('id' => 'Background_header', 'label' => __('Background', 'SimThemes'), 'desc' => __('', 'SimThemes'), 'type' => 'background', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'std' => $header_bg, 'operator' => 'and', 'condition' => 'Display_Header:is(on),Display_Header:not()'), array('label' => __('Main Navigation Menu', 'SimThemes'), 'id' => 'main_navigation_menu', 'type' => 'text', 'desc' => __('Provide the name of menu displays on this page.', 'SimThemes'), 'std' => '', 'condition' => 'Display_Header:is(on),Display_Header:not()'), array('label' => __('Show Header Top', 'SimThemes'), 'id' => 'show_header_top', 'type' => 'on-off', 'desc' => sprintf(__('Shows the Slider when set to %s.', 'SimThemes'), '<code>on</code>'), 'std' => $Display_Header_Top, 'condition' => 'Display_Header:is(on),Display_Header:not()'), array('label' => __('Menu', 'SimThemes'), 'id' => 'menu', 'type' => 'tab'), array('label' => __('Important Note', 'SimThemes'), 'id' => 'header_setting', 'type' => 'textblock', 'desc' => __('Menu Setting', 'SimThemes'), 'class' => 'theme_option_notice', 'section' => 'option_types'), array('label' => __('Menu section Backgroun Color', 'SimThemes'), 'id' => 'menu_background_color', 'type' => 'colorpicker-opacity', 'desc' => __('Change menu item color', 'SimThemes'), 'class' => 'menu_background_color', 'section' => 'option_types', 'std' => ot_get_option('menu_background_color')), array('label' => __('Menu Item Color', 'SimThemes'), 'id' => 'menu_item_color', 'type' => 'colorpicker', 'desc' => __('Change menu item color', 'SimThemes'), 'class' => '', 'section' => 'option_types', 'std' => ot_get_option('menu_item_color')), array('label' => __('Menu Item Hover Color', 'SimThemes'), 'id' => 'menu_item_hover_color', 'type' => 'colorpicker', 'desc' => __('Change menu item color hover', 'SimThemes'), 'class' => '', 'section' => 'option_types', 'std' => ot_get_option('menu_item_hover_color')), array('label' => __('Menu Item Hover Background', 'SimThemes'), 'id' => 'menu_item_hover_background', 'type' => 'colorpicker-opacity', 'desc' => __('Change menu item hover background color', 'SimThemes'), 'section' => 'option_types', 'class' => '', 'std' => ot_get_option('menu_item_hover_background')), array('label' => __('Menu Item Active Background', 'SimThemes'), 'id' => 'menu_item_active_background', 'type' => 'colorpicker-opacity', 'desc' => __('Change menu item active background color', 'SimThemes'), 'section' => 'option_types', 'class' => '', 'std' => ot_get_option('menu_item_active_background')), array('label' => __('Dropdown Background', 'SimThemes'), 'id' => 'dropdown_background', 'type' => 'colorpicker-opacity', 'desc' => __('', 'SimThemes'), 'section' => 'option_types', 'class' => '', 'std' => ot_get_option('dropdown_background')), array('label' => __('Dropdown Item Hover Background Color', 'SimThemes'), 'id' => 'dropdown_item_hover_background', 'type' => 'colorpicker-opacity', 'desc' => __('', 'SimThemes'), 'section' => 'option_types', 'class' => '', 'std' => ot_get_option('dropdown_item_hover_background')), array('label' => __('Dropdown Item Active Background Color', 'SimThemes'), 'id' => 'dropdown_item_active_background', 'type' => 'colorpicker-opacity', 'desc' => __('', 'SimThemes'), 'section' => 'option_types', 'class' => '', 'std' => ot_get_option('dropdown_item_active_background')), array('label' => __('Dropdown Item Color', 'SimThemes'), 'id' => 'dropdown_item_color', 'type' => 'colorpicker', 'desc' => __('', 'SimThemes'), 'section' => 'option_types', 'class' => '', 'std' => ot_get_option('dropdown_item_color')), array('label' => __('Dropdown Item Hover Color', 'SimThemes'), 'id' => 'dropdown_item_hover_color', 'type' => 'colorpicker', 'desc' => __('', 'SimThemes'), 'section' => 'option_types', 'class' => '', 'std' => ot_get_option('dropdown_item_hover_color')), array('label' => __('Dropdown Item Active Color', 'SimThemes'), 'id' => 'dropdown_item_active_color', 'type' => 'colorpicker', 'desc' => __('', 'SimThemes'), 'section' => 'option_types', 'class' => '', 'std' => ot_get_option('dropdown_item_active_color')), array('label' => __('Menu Font Size', 'SimThemes'), 'id' => 'menu_font_size', 'desc' => __('Please provide the menu font size.', 'simthemes'), 'std' => array('0' => $menu_font_size['0'], '1' => $menu_font_size['1']), 'type' => 'measurement', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'section' => 'option_types'), array('label' => __('Menu Dropdown Font Size', 'SimThemes'), 'id' => 'menu_font_size_dropdown', 'desc' => __('Please provide the menu dropdown font size.', 'simthemes'), 'std' => array('0' => $menu_font_size_dropdown['0'], '1' => $menu_font_size_dropdown['1']), 'type' => 'measurement', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'section' => 'option_types'), array('label' => __('Footer', 'SimThemes'), 'id' => 'footer', 'type' => 'tab'), array('id' => 'Display_footer_widget_area', 'label' => __('Display Footer Widget Area', 'SimThemes'), 'desc' => __('Choose to show or hide the footer.', 'SimThemes'), 'type' => 'on-off', 'std' => 'on'), array('id' => 'Display_footer_widget_area', 'label' => __('Display Copyright Area', 'SimThemes'), 'desc' => __('Choose to show or hide the copyright area.', 'SimThemes'), 'type' => 'on-off', 'std' => 'on'), array('label' => __('Background', 'SimThemes'), 'id' => 'background', 'type' => 'tab'), array('id' => 'Display_Custom_Background', 'label' => __('Display Custom Background', 'SimThemes'), 'type' => 'on-off', 'std' => $Display_Custom_Background), array('id' => 'bg_body', 'label' => __('Background', 'SimThemes'), 'desc' => __('', 'SimThemes'), 'type' => 'background', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'condition' => 'Display_Custom_Background:is(on),Display_Custom_Background:not()', 'std' => $bg_body), array('label' => __('Page Title Bar', 'SimThemes'), 'id' => 'page_title', 'type' => 'tab'), array('id' => 'page_title_bar', 'label' => __('Page Title Bar', 'SimThemes'), 'type' => 'on-off', 'std' => $page_title_bar), array('id' => 'page_title_bar_custom_text', 'label' => __('Custom Title', 'SimThemes'), 'desc' => __('On to show custom title', 'SimThemes'), 'type' => 'on-off', 'std' => 'off'), array('label' => __('Custom Title', 'SimThemes'), 'id' => 'Custom_Title_Text', 'type' => 'text', 'desc' => __('Insert custom text for the page title bar.', 'SimThemes'), 'std' => ''), array('label' => __('Custom Subheader Text', 'SimThemes'), 'id' => 'Page_Title_Bar_Custom_Subheader_Text', 'type' => 'text', 'desc' => __('Insert custom subhead text for the page title bar.', 'SimThemes'), 'std' => ''), array('label' => __('Page Title Bar Height', 'SimThemes'), 'id' => 'Page_Title_Bar_Height', 'desc' => __('Example: 87px', 'simthemes'), 'std' => $Page_Title_Bar_Height, 'type' => 'measurement', 'section' => 'header', 'rows' => '', 'post_type' => '', 'taxonomy' => ''), array('id' => 'title_background_page', 'label' => __('Title Background', 'SimThemes'), 'desc' => __('', 'SimThemes'), 'type' => 'background', 'std' => $title_background_page, 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('label' => __('Heading Color', 'SimThemes'), 'id' => 'heading_color_m', 'type' => 'colorpicker', 'desc' => __('', 'SimThemes'), 'section' => 'page_title', 'std' => $Heading_Color), array('label' => __('Text Color', 'SimThemes'), 'id' => 'Text_Color', 'type' => 'colorpicker', 'desc' => __('', 'SimThemes'), 'section' => 'page_title', 'std' => $Text_Color)));
    /**
     * Register our meta boxes using the 
     * ot_register_meta_box() function.
     */
    if (function_exists('ot_register_meta_box')) {
        ot_register_meta_box($ST_Pages_meta_boxes);
    }
}
Пример #28
0
function custom_meta_boxes()
{
    $meta_boxes = array(array('id' => 'orn_audio_format', 'title' => 'Audio Post', 'desc' => 'Select Audio Source', 'pages' => array('post'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('id' => 'orn_audio_source', 'label' => '', 'desc' => '', 'std' => 'soundcloud', 'type' => 'radio', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'choices' => array(array('value' => 'soundcloud', 'label' => 'Sound Cloud', 'src' => ''), array('value' => 'selfhosted', 'label' => 'Self Hosted', 'src' => ''))), array('id' => 'orn_sound_cloud', 'label' => 'URL to Soundcloud Audio', 'desc' => '', 'std' => '', 'type' => 'text', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'settings' => '', 'condition' => 'orn_audio_source:is(soundcloud)'), array('id' => 'orn_self_hosted_mp3', 'label' => 'URL to Mp3 file', 'desc' => '', 'std' => '', 'type' => 'text', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'settings' => '', 'condition' => 'orn_audio_source:is(selfhosted)'), array('id' => 'orn_self_hosted_m4a', 'label' => 'URL to M4A file', 'desc' => '', 'std' => '', 'type' => 'text', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'settings' => '', 'condition' => 'orn_audio_source:is(selfhosted)'), array('id' => 'orn_self_hosted_oga', 'label' => 'URL to OGA file', 'desc' => '', 'std' => '', 'type' => 'text', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'settings' => '', 'condition' => 'orn_audio_source:is(selfhosted)'))), array('id' => 'orn_video_link', 'title' => 'Video Post', 'desc' => 'Enter Video Link ( oEmbed supported ).', 'pages' => array('post'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('id' => 'orn_oembed_videos', 'label' => '', 'desc' => '', 'std' => '', 'type' => 'text', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'settings' => ''))), array('id' => 'orn_metabox_gallery', 'title' => 'Gallery Post', 'desc' => 'Create Gallery', 'pages' => array('post'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('id' => 'orn_image_gallery', 'label' => '', 'desc' => '', 'std' => '', 'type' => 'gallery', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => ''))), array('id' => 'orn_metabox_sidebar', 'title' => 'Post/Page Layout', 'desc' => 'Layout settings for this post/page. Sidebars can be created in the Theme Options > Sidebars and configured in the Apperance > Widgets.', 'pages' => array('post', 'page'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('id' => 'orn_sidebar_layout', 'label' => 'Sidebar Layout', 'desc' => '', 'std' => 'right', 'type' => 'radio_image', 'class' => '', 'choices' => array(array('value' => 'left', 'label' => 'Left Sidebar', 'src' => OT_URL . '/assets/images/layout/left-sidebar.png'), array('value' => 'no-sidebar', 'label' => 'No Sidebar - Full Width', 'src' => OT_URL . '/assets/images/layout/full-width.png'), array('value' => 'right', 'label' => 'Right Sidebar', 'src' => OT_URL . '/assets/images/layout/right-sidebar.png'))), array('id' => 'orn_post_page_sidebar', 'label' => 'Select Sidebar', 'desc' => 'Select a custom sidebar for this post/page.', 'std' => 'default-sidebar', 'type' => 'sidebar-select', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => ''))), array('id' => 'orn_post_settings', 'title' => 'Post Settings', 'desc' => '', 'pages' => array('post'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('id' => 'orn_post_navigation_meta', 'label' => 'Post Navigation Show/Hide', 'desc' => 'You can override theme options to show/hide navigation for this post', 'std' => '', 'choices' => array(array('label' => 'Default (Theme Options)', 'value' => 'default'), array('label' => 'Show', 'value' => 'show'), array('label' => 'Hide', 'value' => 'hide')), 'type' => 'select', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'settings' => ''), array('id' => 'orn_post_featured_meta', 'label' => 'Featured Image Show/Hide', 'desc' => 'You can override theme options to show/hide Featured image for this post', 'std' => '', 'choices' => array(array('label' => 'Default (Theme options)', 'value' => 'default'), array('label' => 'Show', 'value' => 'show'), array('label' => 'Hide', 'value' => 'hide')), 'type' => 'select', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'settings' => ''), array('id' => 'orn_post_tags_meta', 'label' => 'Post Tags Show/Hide', 'desc' => 'You can override theme options to show/hide tags for this post', 'std' => '', 'choices' => array(array('label' => 'Default (Theme options)', 'value' => 'default'), array('label' => 'Show', 'value' => 'show'), array('label' => 'Hide', 'value' => 'hide')), 'type' => 'select', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'settings' => ''))));
    // End $meta_boxes
    foreach ($meta_boxes as $meta_box) {
        // Register each metabox from array
        ot_register_meta_box($meta_box);
    }
    // end foreach
}
Пример #29
0
/**
 * Meta Boxes demo code.
 *
 * You can find all the available option types in theme-options.php.
 *
 * @return    void
 * @since     2.3.0
 */
function ST_Post_meta_boxes()
{
    $ST_post_meta = array('id' => 'Portfolio_section', 'title' => __('Post Details', 'SimThemes'), 'desc' => '', 'pages' => array('post'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('id' => 'show_image_slider_video', 'label' => __('Show Featured Image or Slider or Video', 'SimThemes'), 'desc' => __('', 'SimThemes'), 'std' => '1', 'type' => 'radio', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => '1', 'label' => __('Featured Image', 'SimThemes'), 'src' => ''), array('value' => '2', 'label' => __('Slider', 'SimThemes'), 'src' => ''), array('value' => '3', 'label' => __('Video', 'SimThemes'), 'src' => ''))), array('id' => 'show_youtube_vimeo', 'label' => __('Video Embed Code', 'SimThemes'), 'desc' => __('If select video then provide your youtube or vimeo video code.', 'SimThemes'), 'std' => '', 'type' => 'textarea', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'portfolio_gallery', 'label' => __('Gallery', 'theme-text-domain'), 'desc' => __('If select gallery then add images for the gallery.', 'SimThemes'), 'std' => '', 'type' => 'gallery', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and')));
    /**
     * Register our meta boxes using the 
     * ot_register_meta_box() function.
     */
    if (function_exists('ot_register_meta_box')) {
        ot_register_meta_box($ST_post_meta);
    }
}
Пример #30
0
function _custom_meta_boxes()
{
    /*  Custom meta boxes
    /* ------------------------------------ */
    $page_options = array('id' => 'page-options', 'title' => 'Page Options', 'desc' => '', 'pages' => array('page'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('label' => 'Heading', 'id' => '_heading', 'type' => 'text'), array('label' => 'Subheading', 'id' => '_subheading', 'type' => 'text'), array('label' => 'Primary Sidebar', 'id' => '_sidebar_primary', 'type' => 'sidebar-select', 'desc' => ''), array('label' => 'Secondary Sidebar', 'id' => '_sidebar_secondary', 'type' => 'sidebar-select', 'desc' => ''), array('label' => 'Layout', 'id' => '_layout', 'type' => 'radio-image', 'desc' => '', 'std' => 'inherit', 'choices' => array(array('value' => 'inherit', 'label' => 'Inherit Layout', 'src' => get_template_directory_uri() . '/functions/images/layout-off.png'), array('value' => 'col-1c', 'label' => '1 Column', 'src' => get_template_directory_uri() . '/functions/images/col-1c.png'), array('value' => 'col-2cl', 'label' => '2 Column Left', 'src' => get_template_directory_uri() . '/functions/images/col-2cl.png'), array('value' => 'col-2cr', 'label' => '2 Column Right', 'src' => get_template_directory_uri() . '/functions/images/col-2cr.png'), array('value' => 'col-3cm', 'label' => '3 Column Middle', 'src' => get_template_directory_uri() . '/functions/images/col-3cm.png'), array('value' => 'col-3cl', 'label' => '3 Column Left', 'src' => get_template_directory_uri() . '/functions/images/col-3cl.png'), array('value' => 'col-3cr', 'label' => '3 Column Right', 'src' => get_template_directory_uri() . '/functions/images/col-3cr.png')))));
    $post_options = array('id' => 'post-options', 'title' => 'Post Options', 'desc' => '', 'pages' => array('post'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('label' => 'Primary Sidebar', 'id' => '_sidebar_primary', 'type' => 'sidebar-select', 'desc' => 'Overrides default'), array('label' => 'Secondary Sidebar', 'id' => '_sidebar_secondary', 'type' => 'sidebar-select', 'desc' => 'Overrides default'), array('label' => 'Layout', 'id' => '_layout', 'type' => 'radio-image', 'desc' => 'Overrides the default layout option', 'std' => 'inherit', 'choices' => array(array('value' => 'inherit', 'label' => 'Inherit Layout', 'src' => get_template_directory_uri() . '/functions/images/layout-off.png'), array('value' => 'col-1c', 'label' => '1 Column', 'src' => get_template_directory_uri() . '/functions/images/col-1c.png'), array('value' => 'col-2cl', 'label' => '2 Column Left', 'src' => get_template_directory_uri() . '/functions/images/col-2cl.png'), array('value' => 'col-2cr', 'label' => '2 Column Right', 'src' => get_template_directory_uri() . '/functions/images/col-2cr.png'), array('value' => 'col-3cm', 'label' => '3 Column Middle', 'src' => get_template_directory_uri() . '/functions/images/col-3cm.png'), array('value' => 'col-3cl', 'label' => '3 Column Left', 'src' => get_template_directory_uri() . '/functions/images/col-3cl.png'), array('value' => 'col-3cr', 'label' => '3 Column Right', 'src' => get_template_directory_uri() . '/functions/images/col-3cr.png')))));
    /*  Register meta boxes
    /* ------------------------------------ */
    ot_register_meta_box($page_options);
    ot_register_meta_box($post_options);
}