Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function sw_xicon_metaboxes( $meta_boxes )
- {
- $meta_boxes[] = array(
- 'title' => __( 'Project Information', 'sw_xicon_language' ),
- 'post_types' => array( 'projects' ),
- 'context' => 'normal',
- 'priority' => 'high',
- 'tabs' => array(
- 'descriptions' => array(
- 'label' => __( 'Description', 'sw_xicon_language' ),
- 'icon' => 'dashicons-edit',
- ),
- 'reports' => array(
- 'label' => __( 'Stock Reports', 'sw_xicon_language' ),
- 'icon' => 'dashicons-analytics',
- ),
- 'jobs' => array(
- 'label' => __( 'Job Cards', 'sw_xicon_language' ),
- 'icon' => 'dashicons-clipboard',
- ),
- 'schedules' => array(
- 'label' => __( 'Schedule', 'sw_xicon_language' ),
- 'icon' => 'dashicons-calendar',
- ),
- ),
- 'tab_style' => 'box',
- 'tab_wrapper' => true,
- 'fields' => array(
- array(
- 'name' => __( 'Project Description', 'sw_xicon_language' ),
- 'id' => 'project_description',
- 'type' => 'wysiwyg',
- 'tab' => 'descriptions',
- ),
- array(
- 'name' => __( 'Stock Report Files', 'sw_xicon_language' ),
- 'id' => 'stock_reports',
- 'type' => 'file_input',
- 'tab' => 'reports',
- 'clone' => 'true',
- 'sort_clone' => 'true',
- ),
- array(
- 'name' => __( 'Job Card Files', 'sw_xicon_language' ),
- 'id' => 'job_cards',
- 'type' => 'file_input',
- 'tab' => 'jobs',
- 'clone' => 'true',
- 'sort_clone' => 'true',
- ),
- array(
- 'id' => 'job_schedules',
- 'type' => 'group',
- 'clone' => true,
- 'sort_clone' => true,
- 'tab' => 'schedules',
- 'fields' => array(
- array(
- 'name' => __( 'Job Title', 'sw_xicon_language' ),
- 'id' => 'job_title',
- 'type' => 'text',
- 'columns' => 12,
- ),
- array(
- 'name' => __( 'Start Date', 'sw_xicon_language' ),
- 'id' => 'start_date',
- 'type' => 'date',
- 'columns' => 6,
- ),
- array(
- 'name' => __( 'End Date', 'sw_xicon_language' ),
- 'id' => 'end_date',
- 'type' => 'date',
- 'columns' => 6,
- ),
- ),
- ),
- ),
- );
- $meta_boxes[] = array(
- 'title' => __( 'Project Client', 'sw_xicon_language' ),
- 'post_types' => array( 'projects' ),
- 'context' => 'side',
- 'priority' => 'low',
- 'fields' => array(
- array(
- 'id' => 'xicon_cleint',
- 'name' => __( 'Client', 'sw_xicon_language' ),
- 'type' => 'user',
- 'field_type' => 'select_advanced',
- 'placeholder' => __( 'Select the Client', 'sw_xicon_language' ),
- 'query_args' => array( 'role' => 'xicon_client')
- ),
- ),
- );
- return $meta_boxes;
- }
- add_filter( 'rwmb_meta_boxes', 'sw_xicon_metaboxes' );
Add Comment
Please, Sign In to add comment