Advertisement
Guest User

Untitled

a guest
May 10th, 2018
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. <?php
  2. add_filter( 'rwmb_meta_boxes', 'your_prefix_register_meta_boxes' );
  3. function your_prefix_register_meta_boxes( $meta_boxes ) {
  4. $meta_boxes[] = array (
  5. 'id' => 'work-settings-metabox',
  6. 'title' => 'work settings Metabox',
  7. 'pages' => array (
  8. 'work',
  9. ),
  10. 'context' => 'normal',
  11. 'priority' => 'high',
  12. 'autosave' => false,
  13. 'fields' => array (
  14.  
  15. array (
  16. 'id' => 'work_image_group',
  17. 'type' => 'group',
  18. 'name' => 'Work Image Group',
  19. 'fields' => array (
  20.  
  21. array (
  22. 'id' => 'image',
  23. 'type' => 'image_advanced',
  24. 'name' => 'image',
  25. 'max_file_uploads' => 1,
  26. ),
  27.  
  28. array (
  29. 'id' => 'image_state',
  30. 'name' => 'Image State',
  31. 'type' => 'radio',
  32. 'options' => array (
  33. 'approved' => 'Approved',
  34. 'disapproved' => 'Disapproved',
  35. ),
  36. ),
  37. ),
  38. 'clone' => 1,
  39. ),
  40. ),
  41. );
  42.  
  43. return $meta_boxes;
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement