当前位置: 首页>>代码示例>>PHP>>正文


PHP ot_register_meta_box函数代码示例

本文整理汇总了PHP中ot_register_meta_box函数的典型用法代码示例。如果您正苦于以下问题:PHP ot_register_meta_box函数的具体用法?PHP ot_register_meta_box怎么用?PHP ot_register_meta_box使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了ot_register_meta_box函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _custom_meta_boxes

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);
}
开发者ID:schiz,项目名称:architecture,代码行数:26,代码来源:theme-metaboxes.php

示例2: _custom_meta_boxes

/**
 * 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);
}
开发者ID:net0,项目名称:lecook,代码行数:43,代码来源:meta-boxes.php

示例3: custom_meta_boxes

/**
 * 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);
}
开发者ID:primus1989,项目名称:https---github.com-DataDesignSystems-drishtiq,代码行数:33,代码来源:uni-metabox.php

示例4: _cb_meta

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);
}
开发者ID:TechDevMX,项目名称:BlogJivamukti,代码行数:7,代码来源:cb-meta-boxes.php

示例5: _add_metabox

 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);
     }
 }
开发者ID:DaddyFool,项目名称:travelTest,代码行数:7,代码来源:admin.php

示例6: clients

 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);
     }
 }
开发者ID:Air-Craft,项目名称:air-craft-www,代码行数:7,代码来源:MorpheusMetaBoxes.php

示例7: hu_custom_meta_boxes

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);
}
开发者ID:giorgioriccardi,项目名称:hueman,代码行数:25,代码来源:init-meta-boxes.php

示例8: Members_meta

 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);
     }
 }
开发者ID:shimion,项目名称:st,代码行数:7,代码来源:ST_Team.php

示例9: _custom_meta_boxes

/**
 * 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);
}
开发者ID:developmentDM2,项目名称:CZND,代码行数:36,代码来源:ot-metaboxes.php

示例10: Testimonials_meta

 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);
     }
 }
开发者ID:shimion,项目名称:st,代码行数:7,代码来源:ST_Testimonials.php

示例11: init

 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);
 }
开发者ID:gjaya79,项目名称:urdailynews,代码行数:7,代码来源:Bw_metabox_post.php

示例12: _custom_meta_boxes

/**
 * 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);
}
开发者ID:primarydesign,项目名称:the-color-mint,代码行数:44,代码来源:ot-metaboxes.php

示例13: Services_meta

 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);
     }
 }
开发者ID:shimion,项目名称:st,代码行数:7,代码来源:ST_Service.php

示例14: add_pattern_meta_box

 /**
  * 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);
 }
开发者ID:shellbot,项目名称:WP-Craft-Blogger,代码行数:12,代码来源:class-wpcb-admin.php

示例15: _cb_meta

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);
}
开发者ID:luskyj89,项目名称:mt-wordpress,代码行数:7,代码来源:meta-boxes.php


注:本文中的ot_register_meta_box函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。