Advertisement
Guest User

Untitled

a guest
Jun 6th, 2018
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.78 KB | None | 0 0
  1. <?php
  2. <?php
  3. add_filter( 'rwmb_meta_boxes', 'your_prefix_register_meta_boxes' );
  4. function your_prefix_register_meta_boxes( $meta_boxes ) {
  5.     $meta_boxes[] = array (
  6.       'title' => 'Settings_temp',
  7.       'id' => 'settings-temp',
  8.       'post_types' =>   array (
  9.          'page',
  10.       ),
  11.       'context' => 'normal',
  12.       'priority' => 'high',
  13.       'status' => 'publish',
  14.       'autosave' => false,
  15.       'fields' =>   array (
  16.      array (
  17.       'id' => 'group_2',
  18.       'type' => 'group',
  19.       'name' => 'Group',
  20.       'fields' =>       array (
  21.  
  22.         array (
  23.           'id' => 'checkbox_1',
  24.           'name' => 'Checkbox',
  25.           'type' => 'checkbox',
  26.           'desc' => 'Default Description',
  27.         ),
  28.  
  29.         array (
  30.           'id' => 'group_3',
  31.           'type' => 'group',
  32.           'name' => 'Group',
  33.           'fields' =>           array (
  34.  
  35.             array (
  36.               'id' => 'checkbox_2',
  37.               'type' => 'checkbox',
  38.               'desc' => 'This is some long title',
  39.               'columns' => 3,
  40.             ),
  41.  
  42.             array (
  43.               'id' => 'checkbox_3',
  44.               'type' => 'checkbox',
  45.               'columns' => 1,
  46.             ),
  47.  
  48.             array (
  49.               'id' => 'checkbox_4',
  50.               'type' => 'checkbox',
  51.               'columns' => 1,
  52.             ),
  53.  
  54.             array (
  55.               'id' => 'checkbox_5',
  56.               'type' => 'checkbox',
  57.               'columns' => 1,
  58.             ),
  59.  
  60.             array (
  61.               'id' => 'checkbox_6',
  62.               'type' => 'checkbox',
  63.               'columns' => 1,
  64.             ),
  65.  
  66.             array (
  67.               'id' => 'checkbox_6',
  68.               'type' => 'checkbox',
  69.               'columns' => 1,
  70.             ),
  71.  
  72.             array (
  73.               'id' => 'checkbox_7',
  74.               'type' => 'checkbox',
  75.               'columns' => 1,
  76.             ),
  77.  
  78.             array (
  79.               'id' => 'checkbox_8',
  80.               'type' => 'checkbox',
  81.               'columns' => 1,
  82.             ),
  83.  
  84.             array (
  85.               'id' => 'checkbox_9',
  86.               'type' => 'checkbox',
  87.               'columns' => 2,
  88.             ),
  89.           ),
  90.           'default_state' => 'expanded',
  91.           'groupfield' => 'text',
  92.         ),
  93.       ),
  94.       'default_state' => 'expanded',
  95.       'groupfield' => 'text',
  96.       'tab' => 'tab_1',
  97.     ),
  98.  
  99.     array (
  100.       'id' => 'text_3',
  101.       'type' => 'text',
  102.       'name' => 'Text Field',
  103.       'std' => 'Logged Out Users',
  104.       'required' => 1,
  105.       'tab' => 'tab_1',
  106.     ),
  107.   ),
  108.   'tab_style' => 'default',
  109.   'tab_wrapper' => true,
  110.   'tabs' =>   array (
  111.     'tab_1' =>     array (
  112.       'label' => 'Tab',
  113.       'icon' => '',
  114.     ),
  115.   ),
  116. );
  117. return $meta_boxes;
  118. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement