Guest User

Untitled

a guest
Jan 21st, 2020
136
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. add_filter( 'rwmb_meta_boxes', function( $meta_boxes ) {
  3. $meta_boxes[] = [
  4. 'title' => 'Test Meta Box',
  5. 'fields' => [
  6. [
  7. 'type' => 'select_advanced',
  8. 'id' => 's',
  9. 'name' => 'Select a month',
  10. 'options' => [
  11. 'jan' => 'January',
  12. 'feb' => 'February',
  13. ],
  14. ],
  15. [
  16. 'type' => 'group',
  17. 'id' => 'g_jan',
  18. 'name' => 'January Options',
  19. 'visible' => ['s', 'jan'],
  20. 'fields' => [
  21. [
  22. 'id' => 'l_jan',
  23. 'name' => 'Location',
  24. ],
  25. ],
  26. ],
  27. [
  28. 'type' => 'group',
  29. 'id' => 'g_feb',
  30. 'name' => 'February Options',
  31. 'visible' => ['s', 'feb'],
  32. 'fields' => [
  33. [
  34. 'id' => 'l_feb',
  35. 'name' => 'Location',
  36. ],
  37. ],
  38. ],
  39. ],
  40. ];
  41. return $meta_boxes;
  42. } );
RAW Paste Data