Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- add_filter( 'rwmb_meta_boxes', 'your_prefix_register_meta_boxes' );
- function your_prefix_register_meta_boxes( $meta_boxes ) {
- $meta_boxes[] = array (
- 'id' => 'question',
- 'title' => 'Question',
- 'pages' => array (
- 'question',
- ),
- 'context' => 'after_title',
- 'priority' => 'high',
- 'autosave' => false,
- 'fields' => array (
- array (
- 'id' => 'post_4',
- 'type' => 'post',
- 'name' => 'Post',
- 'post_type' => 'post',
- 'field_type' => 'select_advanced',
- ),
- array (
- 'id' => 'textarea_bchoa_question_text',
- 'type' => 'textarea',
- 'name' => 'Question',
- 'desc' => 'Please enter any additional content here - be as descriptive as you like.',
- 'rows' => '3',
- ),
- array (
- 'id' => 'checkbox_bchoa_notification',
- 'name' => 'Notification',
- 'type' => 'checkbox',
- 'desc' => 'Check this box if you want to be notified of responses',
- 'std' => 1,
- ),
- array (
- 'id' => 'divider_3',
- 'type' => 'divider',
- 'name' => 'Divider',
- ),
- ),
- 'validation' => [
- 'rules' => [
- 'post_title' => [
- 'required' => true,
- 'minlength' => 5,
- ],
- ],
- ],
- );
- return $meta_boxes;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement