Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_filter( 'rwmb_meta_boxes', 'gnl_partner_post_box' );
- function gnl_partner_post_box( $meta_boxes ) {
- global $sites, $clients_array, $cats_array;
- $prefix = 'gnl_post_attributes_';
- // 1st meta box
- $meta_boxes[] = array(
- 'id' => 'post_attributes_box',
- 'title' => __( 'Post Attributes', 'textdomain' ),
- 'post_types' => array( 'post', 'gnl_events'),
- 'context' => 'side',
- 'priority' => 'high',
- 'fields' => array(
- array(
- 'id' => $prefix . 'alias',
- 'type' => 'taxonomy',
- 'name' => esc_html__( 'Author Alias/Contributor', 'metabox-online-generator' ),
- 'desc' => esc_html__( 'Select Alias', 'metabox-online-generator' ),
- 'taxonomy' => 'contributor',
- 'field_type' => 'select_advanced',
- 'multiple' => true,
- ),
- array(
- 'id' => $prefix . 'sections',
- 'type' => 'taxonomy',
- 'name' => esc_html__( 'Category', 'metabox-online-generator' ),
- 'desc' => esc_html__( 'Select Category', 'metabox-online-generator' ),
- 'taxonomy' => 'section',
- 'field_type' => 'select_tree',
- //'admin_columns' => true,
- ),
- array(
- 'id' => $prefix . 'tags',
- 'type' => 'taxonomy',
- 'name' => esc_html__( 'Tags', 'metabox-online-generator' ),
- 'desc' => esc_html__( 'Apply Tags', 'metabox-online-generator' ),
- 'taxonomy' => 'tag',
- 'field_type' => 'select_advanced',
- 'multiple' => true,
- ),
- array(
- 'name' => __( 'Partners:', 'textdomain' ),
- 'desc' => 'Add partners. List generated from the Intranet',
- 'id' => $prefix . 'partners',
- 'type' => 'select_advanced',
- 'class' => 'client-box-class',
- 'options' => $clients_array,
- 'multiple' => true,
- ),
- array(
- 'id' => $prefix . 'cities',
- 'type' => 'taxonomy',
- 'name' => esc_html__( 'Cities', 'metabox-online-generator' ),
- 'desc' => esc_html__( 'Select Cities', 'metabox-online-generator' ),
- 'taxonomy' => 'city',
- 'field_type' => 'checkbox_list',
- 'multiple' => true,
- ),
- array(
- 'name' => __( 'Locations/Venues:', 'textdomain' ),
- 'desc' => 'Add Locations associated to this post',
- 'id' => $prefix . 'locations',
- 'type' => 'post',
- 'class' => 'client-box-class',
- 'post_type' => 'gnl_locations',
- 'field_type' => 'select_advanced',
- 'multiple' => true,
- ),
- array(
- 'id' => $prefix . 'rating',
- 'name' => esc_html__( 'Importance Rating:', 'textdomain' ),
- 'type' => 'select',
- 'placeholder' => esc_html__( 'Select Rating', 'textdomain' ),
- 'options' => array(
- 1 => '1 - High',
- '2 - Normal',
- '3 - Low',
- ),
- 'std' => '2',
- ),
- array(
- 'id' => $prefix . 'featured',
- 'name' => esc_html__( 'Featured Post', 'textdomain' ),
- 'type' => 'checkbox',
- 'desc' => esc_html__( 'Yes, This is Featured', 'textdomain' ),
- ),
- ),
- );
- return $meta_boxes;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement