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


PHP new_cmb2_box函数代码示例

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


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

示例1: seventeen_register_exhibition_dates

function seventeen_register_exhibition_dates()
{
    $prefix = '_seventeen_';
    $exhibition_dates = new_cmb2_box(array('id' => $prefix . 'exhibition_dates', 'title' => __('Exhibition Dates', 'seventeen'), 'object_types' => array('exhibitions'), 'context' => 'normal', 'priority' => 'high', 'show_names' => true));
    $exhibition_dates->add_field(array('name' => __('Start Date', 'seventeen'), 'desc' => __('The date the exhibition opens', 'seventeen'), 'id' => $prefix . 'startdate', 'type' => 'text_date_timestamp', 'date_format' => __('d-m-Y', 'seventeen')));
    $exhibition_dates->add_field(array('name' => __('End Date', 'seventeen'), 'desc' => __('The date and time the exhibition closes', 'seventeen'), 'id' => $prefix . 'enddate', 'type' => 'text_datetime_timestamp', 'date_format' => __('d-m-Y', 'seventeen')));
}
开发者ID:psflannery,项目名称:seventeen_functionality,代码行数:7,代码来源:cmb2-metaboxes.php

示例2: webinar_mb

function webinar_mb($meta_boxes)
{
    $prefix = "";
    $webinar = new_cmb2_box(array('id' => 'webinar-data', 'title' => 'Webinar Details', 'object_types' => array('citrix_webinar'), 'show_on' => array(), 'context' => 'side', 'priority' => 'default', 'show_names' => true));
    $webinar->add_field(array('name' => 'Webinar Key', 'id' => $prefix . 'webinar_key', 'type' => 'text', 'default' => get_old_webinar_key(), 'options' => array()));
    $webinar->add_field(array('name' => 'PDF Url', 'id' => $prefix . 'webinar_pdf', 'type' => 'file', 'default' => get_old_pdf_value(), 'options' => array()));
}
开发者ID:eliseoeric,项目名称:citrix-connect,代码行数:7,代码来源:webinar_mb.php

示例3: fields

 /**
  * Add custom fields to the CPT
  *
  * @since  0.1.0
  * @return void
  */
 public function fields()
 {
     $prefix = 'wds_announcements_';
     $cmb = new_cmb2_box(array('id' => $prefix . 'metabox', 'title' => __('WDS Announcements Meta Box', 'wds-announcements'), 'object_types' => array('wds-announcements'), 'context' => 'normal', 'priority' => 'high'));
     // Regular text field
     $cmb->add_field(array('name' => __('Link URL', 'cmb2'), 'desc' => __('(optional) e.g. http://www.lifehacker.com', 'cmb2'), 'id' => $prefix . 'url', 'type' => 'text_url'));
 }
开发者ID:WebDevStudios,项目名称:WDS-Announcements,代码行数:13,代码来源:class-announcements-cpt.php

示例4: register_metabox

 /**
  * Add the metabox
  * @since  0.1.0
  */
 public function register_metabox()
 {
     // Start with an underscore to hide fields from custom fields list
     $prefix = '_wds_ratings_';
     $cmb = new_cmb2_box(array('id' => $prefix . 'metabox', 'title' => __('WDS Ratings', 'wds_ratings'), 'object_types' => array('page', 'post'), 'context' => 'side', 'show_names' => false));
     $cmb->add_field(array('desc' => $this->filter_label(), 'id' => $prefix . 'filter', 'type' => 'checkbox'));
 }
开发者ID:xscript,项目名称:WDS-Ratings,代码行数:11,代码来源:meta-box.php

示例5: ht_kb_voting_meta_boxes

 /**
  * Register meta boxes
  * @uses the meta-boxes module
  */
 function ht_kb_voting_meta_boxes()
 {
     $prefix = '_ht_voting_';
     $voting_metabox = new_cmb2_box(array('id' => $prefix . 'metabox', 'title' => __('Voting Options', 'ht-knowledge-base'), 'object_types' => array('ht_kb'), 'context' => 'normal', 'priority' => 'high', 'show_names' => true));
     //dummy to upgrade fields
     $voting_metabox->add_field(array('name' => 'update_dummy', 'id' => $prefix . 'updade_dummy', 'type' => 'title', 'show_on_cb' => array($this, 'maybe_upgrade_meta_fields')));
     //voting enable
     $voting_metabox->add_field(array('name' => __('Disable Voting', 'ht-knowledge-base'), 'description' => __('Disable voting on this article', 'ht-knowledge-base'), 'id' => $prefix . 'voting_disabled', 'type' => 'checkbox', 'show_on_cb' => array($this, 'cmb_only_show_for_voting_enabled')));
     /*
     //voting reset - no longer used - see ht-voting-backend instead
     $voting_metabox->add_field( array(
     	'name' => __( 'Reset Voting', 'ht-knowledge-base' ),
     	'description' => __( 'Check this box to reset all votes for this article on update', 'ht-knowledge-base' ),
     	'id'   => $prefix .'voting_reset',
     	'type' => 'checkbox',
     	'default' => false,
     	'sanitization_cb' => array( $this, 'santize_reset_field' ), 
     	'show_on_cb' => array( $this, 'cmb_only_show_for_votes' ),
     ) );
     */
     //voting reset confirmation
     $voting_metabox->add_field(array('name' => __('No Votes', 'ht-knowledge-base'), 'description' => __('There are currently no votes or votes have been reset', 'ht-knowledge-base'), 'id' => $prefix . 'voting_reset_confirm', 'type' => 'checkbox', 'default' => true, 'sanitization_cb' => array($this, 'santize_reset_confirm_field'), 'show_on_cb' => array($this, 'cmb_only_show_for_no_votes')));
     //usefulness
     $voting_metabox->add_field(array('name' => __('Usefulness', 'ht-knowledge-base'), 'description' => __('Set the usefulness for this article (editing may cause inconsistencies with voting)', 'ht-knowledge-base'), 'id' => '_ht_kb_usefulness', 'type' => 'text'));
 }
开发者ID:jamestrevorlees,项目名称:odd-web-v1.00,代码行数:29,代码来源:ht-voting-meta-boxes.php

示例6: anp_meetings_add_proposal_metabox

function anp_meetings_add_proposal_metabox()
{
    $cmb = new_cmb2_box(array('id' => 'proposal-detail-page', 'title' => __('Proposal Detail Page', 'meeting'), 'object_types' => array('proposal'), 'context' => 'side', 'priority' => 'high'));
    $cmb->add_field(array('name' => __('Status', 'meeting'), 'id' => 'proposal_status', 'type' => 'taxonomy_select', 'taxonomy' => 'proposal_status', 'attributes' => array('required' => 'required')));
    $cmb->add_field(array('name' => __('Date Accepted', 'meeting'), 'id' => 'meeting_date', 'type' => 'text_date'));
    $cmb->add_field(array('name' => __('Date Effective', 'meeting'), 'id' => 'proposal_date_effective', 'type' => 'text_date'));
}
开发者ID:glocalcoop,项目名称:anp-meetings,代码行数:7,代码来源:custom-fields.php

示例7: cmb2_tb_metaboxes

function cmb2_tb_metaboxes()
{
    // Start with an underscore to hide fields from custom fields list
    $prefix = 'my_meta_';
    /**
     * Initiate the metabox
     */
    $tb_boxes = new_cmb2_box(array('id' => 'contact_info', 'title' => __('Contact info', 'cmb2'), 'object_types' => array('tablebookings'), 'type' => 'text', 'context' => 'normal', 'priority' => 'high', 'show_names' => true));
    // Booking Name
    $tb_boxes->add_field(array('name' => __('Contact Name', 'cmb2'), 'desc' => __('Contact Name', 'cmb2'), 'id' => $prefix . 'name', 'type' => 'text'));
    // Email text field
    $tb_boxes->add_field(array('name' => __('Email', 'cmb2'), 'desc' => __('Email Address', 'cmb2'), 'object_types' => array('tablebookings'), 'id' => $prefix . 'email', 'type' => 'text_email'));
    // Booking Phone no.
    $tb_boxes->add_field(array('name' => __('Phone', 'cmb2'), 'desc' => __('Phone Number', 'cmb2'), 'id' => $prefix . 'phone', 'type' => 'text'));
    $tb_boxes2 = new_cmb2_box(array('id' => 'company_info', 'title' => __('Company info', 'cmb2'), 'object_types' => array('tablebookings'), 'type' => 'text', 'context' => 'normal', 'priority' => 'high', 'show_names' => true));
    // Company Name
    $tb_boxes2->add_field(array('name' => __('Company Name', 'cmb2'), 'id' => $prefix . 'companyname', 'type' => 'text'));
    // Company Address
    $tb_boxes2->add_field(array('name' => __('Company Address', 'cmb2'), 'id' => $prefix . 'companyaddress', 'type' => 'text'));
    $tb_boxes3 = new_cmb2_box(array('id' => 'Booking_info', 'title' => __('Booking info', 'cmb2'), 'object_types' => array('tablebookings'), 'type' => 'text', 'context' => 'normal', 'priority' => 'high', 'show_names' => true));
    // Number of delegates
    $tb_boxes3->add_field(array('name' => __('Number of Delegates', 'cmb2'), 'id' => $prefix . 'delenum', 'type' => 'text'));
    // Delegate 1 first and last names
    $tb_boxes3->add_field(array('name' => __('Delegate 1 - First Name', 'cmb2'), 'id' => $prefix . 'd1firstname', 'type' => 'text'));
    $tb_boxes3->add_field(array('name' => __('Delegate 1 - Second Name', 'cmb2'), 'id' => $prefix . 'd1secondname', 'type' => 'text'));
    // Delegate 2 first and last names
    $tb_boxes3->add_field(array('name' => __('Delegate 2 - First Name', 'cmb2'), 'id' => $prefix . 'd2firstname', 'type' => 'text'));
    $tb_boxes3->add_field(array('name' => __('Delegate 2 - Second Name', 'cmb2'), 'id' => $prefix . 'd2secondname', 'type' => 'text'));
    // Delegate 3 first and last names
    $tb_boxes3->add_field(array('name' => __('Delegate 3 - First Name', 'cmb2'), 'id' => $prefix . 'd3firstname', 'type' => 'text'));
    $tb_boxes3->add_field(array('name' => __('Delegate 3 - Second Name', 'cmb2'), 'id' => $prefix . 'd3secondname', 'type' => 'text'));
    // Delegate 4 first and last names
    $tb_boxes3->add_field(array('name' => __('Delegate 4 - First Name', 'cmb2'), 'id' => $prefix . 'd4firstname', 'type' => 'text'));
    $tb_boxes3->add_field(array('name' => __('Delegate 4 - Second Name', 'cmb2'), 'id' => $prefix . 'd4secondname', 'type' => 'text'));
    // Delegate 5 first and last names
    $tb_boxes3->add_field(array('name' => __('Delegate 5 - First Name', 'cmb2'), 'id' => $prefix . 'd5firstname', 'type' => 'text'));
    $tb_boxes3->add_field(array('name' => __('Delegate 5 - Second Name', 'cmb2'), 'id' => $prefix . 'd5secondname', 'type' => 'text'));
    // Delegate 6 first and last names
    $tb_boxes3->add_field(array('name' => __('Delegate 6 - First Name', 'cmb2'), 'id' => $prefix . 'd6firstname', 'type' => 'text'));
    $tb_boxes3->add_field(array('name' => __('Delegate 6 - Second Name', 'cmb2'), 'id' => $prefix . 'd6secondname', 'type' => 'text'));
    // Delegate 7 first and last names
    $tb_boxes3->add_field(array('name' => __('Delegate 7 - First Name', 'cmb2'), 'id' => $prefix . 'd7firstname', 'type' => 'text'));
    $tb_boxes3->add_field(array('name' => __('Delegate 7 - Second Name', 'cmb2'), 'id' => $prefix . 'd7secondname', 'type' => 'text'));
    // Delegate 8 first and last names
    $tb_boxes3->add_field(array('name' => __('Delegate 8 - First Name', 'cmb2'), 'id' => $prefix . 'd8firstname', 'type' => 'text'));
    $tb_boxes3->add_field(array('name' => __('Delegate 8 - Second Name', 'cmb2'), 'id' => $prefix . 'd8secondname', 'type' => 'text'));
    // Delegate 9 first and last names
    $tb_boxes3->add_field(array('name' => __('Delegate 9 - First Name', 'cmb2'), 'id' => $prefix . 'd9firstname', 'type' => 'text'));
    $tb_boxes3->add_field(array('name' => __('Delegate 9 - Second Name', 'cmb2'), 'id' => $prefix . 'd9secondname', 'type' => 'text'));
    // Delegate 10 first and last names
    $tb_boxes3->add_field(array('name' => __('Delegate 10 - First Name', 'cmb2'), 'id' => $prefix . 'd10firstname', 'type' => 'text'));
    $tb_boxes3->add_field(array('name' => __('Delegate 10 - Second Name', 'cmb2'), 'id' => $prefix . 'd10secondname', 'type' => 'text'));
    $tb_boxes3->add_field(array('name' => __('Total cost', 'cmb2'), 'id' => $prefix . 'total_cost', 'type' => 'text'));
    $tb_boxes3->add_field(array('name' => __('Paid', 'cmb2'), 'id' => $prefix . 'paid', 'type' => 'checkbox', 'default' => false));
    $tb_boxes3->add_field(array('name' => __('Order ID', 'cmb2'), 'id' => $prefix . 'order_id', 'type' => 'text'));
    // Order info
    $tb_boxes4 = new_cmb2_box(array('id' => 'order_info', 'title' => __('Order info', 'cmb2'), 'object_types' => array('tablebookings'), 'show_on' => array('key' => 'id', 'value' => ''), 'type' => 'text', 'context' => 'normal', 'priority' => 'high', 'show_names' => true));
    $tb_boxes4->add_field(array('name' => __('Password', 'cmb2'), 'id' => $prefix . 'password', 'type' => 'text'));
    $tb_boxes4->add_field(array('name' => __('Response', 'cmb2'), 'id' => $prefix . 'response', 'type' => 'text'));
}
开发者ID:barrmull77,项目名称:tablebooker,代码行数:60,代码来源:tablebooker.php

示例8: trientamedik_register_product_metabox

function trientamedik_register_product_metabox()
{
    $prefix = '_trientamedik_';
    $cmb_product = new_cmb2_box(array('id' => $prefix . 'product', 'title' => __('Slide Details', 'trientamedik'), 'object_types' => array('product')));
    $cmb_product->add_field(array('name' => __('Main Image', 'trientamedik'), 'desc' => __('Upload an image or enter a URL.', 'trientamedik'), 'id' => $prefix . 'product_image', 'type' => 'file'));
    $cmb_product->add_field(array('name' => 'Project Image', 'desc' => '', 'id' => $prefix . 'product_image_list', 'type' => 'file_list'));
}
开发者ID:jrajalu,项目名称:trientamedik,代码行数:7,代码来源:theme-metabox.php

示例9: skillMetaBox

function skillMetaBox()
{
    global $cmb_skill;
    $cmb_skill_fields = new_cmb2_box(array('id' => $cmb_skill . 'meta', 'title' => __('Skill Information', 'cmb2'), 'object_types' => array('skill'), 'show_names' => true));
    $cmb_skill_fields->add_field(array('name' => __('Skill Percentage', 'cmb2'), 'id' => $cmb_skill . 'meta_percentage', 'type' => 'text_small', 'attributes' => array('type' => 'number', 'min' => 1, 'max' => 100), 'after_field' => '%', 'default' => '1'));
    $cmb_skill_fields->add_field(array('name' => __('Skill Percentage Color', 'cmb2'), 'id' => $cmb_skill . 'meta_percentage_color', 'type' => 'colorpicker', 'default' => '#6277b2'));
}
开发者ID:somratexel,项目名称:somrat_dot_me,代码行数:7,代码来源:exela-app-bootstrap.php

示例10: jpak_project_metaboxes

function jpak_project_metaboxes()
{
    $prefix = '_jpak_project_';
    // Project Details Box
    $cmb = new_cmb2_box(array('id' => 'project_details', 'title' => __('Project Details', 'cmb2'), 'object_types' => array('jpak_project'), 'context' => 'normal', 'priority' => 'high', 'show_names' => true));
    // Project Subtitle
    $cmb->add_field(array('name' => 'Subtitle', 'desc' => 'Displays on archive page entry hover. Ex: "Custom Genesis Child Theme"', 'id' => $prefix . 'subtitle', 'type' => 'text'));
    // Color Picker
    $cmb->add_field(array('name' => 'Project Color', 'desc' => __('Used in page background and button accent.', 'cmb2'), 'id' => $prefix . 'color', 'type' => 'colorpicker', 'default' => '#ffffff'));
    // Full Image
    $cmb->add_field(array('name' => 'Full Image', 'desc' => 'Recommended Width: 1200px', 'id' => $prefix . 'full_image', 'type' => 'file', 'options' => array('url' => false, 'add_upload_file_text' => 'Upload Image')));
    // Desktop Preview
    $cmb->add_field(array('name' => 'Desktop Preview Image', 'desc' => 'Recommended Size: 1100px x 700px.', 'id' => $prefix . 'desktop_preview', 'type' => 'file', 'options' => array('url' => false, 'add_upload_file_text' => 'Upload Image')));
    // Mobile Preview
    $cmb->add_field(array('name' => 'Mobile Preview Image', 'desc' => 'Recommended Size: 400px x 650px.', 'id' => $prefix . 'mobile_preview', 'type' => 'file', 'options' => array('url' => false, 'add_upload_file_text' => 'Upload Image')));
    // Features
    $cmb->add_field(array('name' => __('Features', 'cmb2'), 'id' => $prefix . 'features', 'type' => 'text', 'repeatable' => true));
    // Live URL
    $cmb->add_field(array('name' => __('Live Site URL', 'cmb2'), 'desc' => __('For button if project type is "Website".', 'cmb2'), 'id' => $prefix . 'live_url', 'type' => 'text_url', 'protocols' => array('http', 'https')));
    // Testimonial
    $cmb->add_field(array('name' => 'Testimonial', 'desc' => 'Do not add quotation marks.', 'id' => $prefix . 'testimonial', 'type' => 'textarea_small'));
    // Testimonial Name
    $cmb->add_field(array('name' => 'Testimonial Name', 'desc' => 'Ex: "Jimbo Fisher"', 'id' => $prefix . 'testimonial_name', 'type' => 'text'));
    // Testimonial Occupation
    $cmb->add_field(array('name' => 'Testimonial Occupation', 'desc' => 'Ex: "Head Football Coach, USF"', 'id' => $prefix . 'testimonial_occupation', 'type' => 'text'));
}
开发者ID:JordanPak,项目名称:JordanPak-Functionality,代码行数:26,代码来源:project.php

示例11: cmb2_magicsuggest_metaboxes_example

/**
 * Define the metabox and field configurations.
 *
 * @param  array $meta_boxes
 * @return array
 */
function cmb2_magicsuggest_metaboxes_example()
{
    $prefix = '_cmb2_magicsuggest_demo_';
    $example_meta = new_cmb2_box(array('id' => $prefix . 'metabox', 'title' => __('cmb2-magicsuggest-field demo', 'cmb2'), 'object_types' => array('page'), 'context' => 'normal', 'priority' => 'high', 'show_names' => true));
    $example_meta->add_field(array('name' => __('Grab some fruits', 'cmb2'), 'desc' => __('Enter up to 6 fruits.', 'cmb2'), 'id' => $prefix . 'fruits', 'type' => 'magicsuggest', 'options' => array('data' => array('Banana', 'Apple', 'Orange', 'Lemon', 'Kiwi'), 'allow_free_entries' => true, 'max_selection' => 6), 'attributes' => array('placeholder' => 'Add or grab some fruit here')));
    $example_meta->add_field(array('name' => __('Related Posts', 'cmb2'), 'desc' => __('Add related posts', 'cmb2'), 'id' => $prefix . 'related_posts', 'type' => 'magicsuggest', 'options' => array('data' => get_some_posts_data(), 'expand_on_focus' => true, 'allow_free_entries' => false, 'value_field' => 'post_id', 'display_field' => 'post_title'), 'attributes' => array('placeholder' => 'Enter a related post title here..')));
}
开发者ID:eliottparis,项目名称:cmb2-magicsuggest-field,代码行数:13,代码来源:example-field-setup.php

示例12: mbdb_book_grid_meta_boxes

function mbdb_book_grid_meta_boxes()
{
    $mbdb_book_grid_metabox = new_cmb2_box(array('id' => 'mbdb_book_grid_metabox', 'title' => __('Book Grid Settings', 'mooberry-book-manager'), 'object_types' => array('page'), 'context' => 'normal', 'priority' => 'default', 'show_names' => true));
    $mbdb_book_grid_metabox->add_field(array('name' => __('Display Books on This Page?', 'mooberry-book-manager'), 'id' => '_mbdb_book_grid_display', 'type' => 'select', 'default' => 'no', 'options' => array('yes' => __('Yes', 'mooberry-book-manager'), 'no' => __('No', 'mooberry-book-manager'))));
    $mbdb_book_grid_metabox->add_field(array('name' => __('Books to Display', 'mooberry-book-manager'), 'id' => '_mbdb_book_grid_books', 'type' => 'select', 'options' => mbdb_book_grid_selection_options()));
    $mbdb_book_grid_metabox->add_field(array('name' => __('Select Books', 'mooberry-book-manager'), 'id' => '_mbdb_book_grid_custom', 'type' => 'multicheck', 'options' => mbdb_get_book_array()));
    $mbdb_book_grid_metabox->add_field(array('name' => __('Select Genres', 'mooberry-book-manager'), 'id' => '_mbdb_book_grid_genre', 'type' => 'multicheck', 'options' => mbdb_get_term_options('mbdb_genre')));
    $mbdb_book_grid_metabox->add_field(array('name' => __('Select Series', 'mooberry-book-manager'), 'id' => '_mbdb_book_grid_series', 'type' => 'multicheck', 'options' => mbdb_get_term_options('mbdb_series')));
    $mbdb_book_grid_metabox->add_field(array('name' => __('Select Tags', 'mooberry-book-manager'), 'id' => '_mbdb_book_grid_tag', 'type' => 'multicheck', 'options' => mbdb_get_term_options('mbdb_tag')));
    $mbdb_book_grid_metabox->add_field(array('name' => __('Select Publishers', 'mooberry-book-manager'), 'id' => '_mbdb_book_grid_publisher', 'type' => 'multicheck', 'options' => mbdb_get_publishers('no')));
    $mbdb_book_grid_metabox->add_field(array('name' => __('Select Editors', 'mooberry-book-manager'), 'id' => '_mbdb_book_grid_editor', 'type' => 'multicheck', 'options' => mbdb_get_term_options('mbdb_editor')));
    $mbdb_book_grid_metabox->add_field(array('name' => __('Select Illustrators', 'mooberry-book-manager'), 'id' => '_mbdb_book_grid_illustrator', 'type' => 'multicheck', 'options' => mbdb_get_term_options('mbdb_illustrator')));
    $mbdb_book_grid_metabox->add_field(array('name' => __('Select Cover Artists', 'mooberry-book-manager'), 'id' => '_mbdb_book_grid_cover_artist', 'type' => 'multicheck', 'options' => mbdb_get_term_options('mbdb_cover_artist')));
    $group_by_options = mbdb_book_grid_group_by_options();
    $count = count($group_by_options);
    for ($x = 1; $x < $count; $x++) {
        $mbdb_book_grid_metabox->add_field(array('name' => __('Group Books By', 'mooberry-book-manager'), 'id' => '_mbdb_book_grid_group_by_level_' . $x, 'type' => 'select', 'options' => $group_by_options));
        // put a warning at the 5th level
        if ($x == 5) {
            $mbdb_book_grid_metabox->add_field(array('name' => __('Warning: Setting more than 5 levels could cause the page to timeout and not display.', 'mooberry-book-manager'), 'type' => 'title', 'id' => '_mbdb_book_grid_warning', 'attributes' => array('display' => 'none')));
        }
    }
    $mbdb_book_grid_metabox->add_field(array('name' => __('Order By', 'mooberry-book-manager'), 'id' => '_mbdb_book_grid_order', 'type' => 'select', 'options' => mbdb_book_grid_order_options()));
    $mbdb_book_grid_metabox->add_field(array('name' => __('Use default cover height?', 'mooberry-book-manager'), 'id' => '_mbdb_book_grid_cover_height_default', 'type' => 'select', 'default' => 'yes', 'options' => array('yes' => __('Yes', 'mooberry-book-manager'), 'no' => __('No', 'mooberry-book-manager'))));
    $mbdb_book_grid_metabox->add_field(array('name' => __('Book Cover Height (px)', 'mooberry-book-manager'), 'id' => '_mbdb_book_grid_cover_height', 'type' => 'text_small', 'attributes' => array('type' => 'number', 'pattern' => '\\d*', 'min' => 50)));
    $mbdb_book_grid_metabox->add_field(array('name' => __('Additional Content (bottom)', 'mooberry-book-manager'), 'id' => '_mbdb_book_grid_description_bottom', 'type' => 'wysiwyg', 'description' => __('This displays under the book grid.', 'mooberry-book-manager'), 'options' => array('wpautop' => true, 'media_buttons' => true, 'textarea_rows' => 10, 'tabindex' => '', 'editor_css' => '', 'editor_class' => '', 'teeny' => false, 'dfw' => false, 'tinymce' => true, 'quicktags' => true)));
    $mbdb_book_grid_metabox = apply_filters('mbdb_book_grid_meta_boxes', $mbdb_book_grid_metabox);
}
开发者ID:joeytwiddle,项目名称:Mooberry-Book-Manager,代码行数:28,代码来源:book-grid.php

示例13: add_fields

 /**
  * Add the options metabox to the array of metaboxes
  * @since  0.1.0
  */
 public static function add_fields()
 {
     // hook in our save notices
     $container = new_cmb2_box(array('id' => 'vsi_fields_products', 'title' => 'Informações VSI Gestão', 'object_types' => array('product'), 'context' => 'normal', 'priority' => 'high', 'show_names' => true));
     // Set our CMB2 field
     $container->add_field(array('name' => __('ID de Produtos ', 'vinhasoft'), 'desc' => __('ID dos Produtos na base do VSI Gestão', 'vinhasoft'), 'id' => 'vsigestao_product_id', 'type' => 'text', 'default' => '', 'attributes' => array('required' => 'required', 'readonly' => 'readonly')));
 }
开发者ID:shankarnakai,项目名称:gbdesign,代码行数:11,代码来源:Produto.php

示例14: myxon_register_service_metabox

function myxon_register_service_metabox()
{
    $prefix = '_myxon_';
    $cmb_service = new_cmb2_box(array('id' => $prefix . 'service', 'title' => __('Service Details', 'myxon'), 'object_types' => array('service')));
    $cmb_service->add_field(array('name' => __('Main Image', 'myxon'), 'desc' => __('Upload an image or enter a URL.', 'myxon'), 'id' => $prefix . 'service_image', 'type' => 'file'));
    $cmb_service->add_field(array('name' => 'Project Image', 'desc' => '', 'id' => $prefix . 'service_image_list', 'type' => 'file_list'));
}
开发者ID:jrajalu,项目名称:myxon,代码行数:7,代码来源:theme-metabox.php

示例15: page_mb

function page_mb($meta_boxes)
{
    $prefix = "_WW_";
    $page_options = new_cmb2_box(array('id' => 'page_options', 'title' => 'Page Options', 'object_types' => array('page'), 'context' => 'normal', 'priority' => 'high', 'show_names' => true));
    $page_options->add_field(array('id' => $prefix . 'header_class', 'name' => 'Page header class', 'description' => 'Add any clases you would like added to the .page_header here.', 'type' => 'text'));
    $page_options->add_field(array('id' => $prefix . 'content_class', 'name' => 'Content class', 'description' => 'Add any clases you would like added to the .entry-content here.', 'type' => 'text'));
}
开发者ID:eliseoeric,项目名称:woodys_waterfront,代码行数:7,代码来源:page_mb.php


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