Advertisement
webrur

Class 11

Apr 25th, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. <?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access pages directly.
  2.  
  3. // framework options filter example
  4. function factorian_metabox_options( $options ) {
  5.  
  6. $options = array(); // remove old options
  7.  
  8. // Page Meta Options
  9. $options[] = array(
  10. 'id' => 'page_meta_options',
  11. 'title' => 'Page Setiings',
  12. 'post_type' => 'page',
  13. 'context' => 'normal',
  14. 'priority' => 'high',
  15. 'sections' => array(
  16.  
  17. // begin: a section
  18. array(
  19. 'name' => 'factorian_page_option_meta',
  20. 'icon' => 'fa fa-cog',
  21.  
  22. // begin: fields
  23. 'fields' => array(
  24.  
  25. // begin: a field
  26. array(
  27. 'id' => 'enable_title',
  28. 'type' => 'switcher',
  29. 'title' => esc_html__('Enable Title?', 'factorian-webrur'),
  30. 'default' => true,
  31. 'desc' => esc_html__('Do you want to show the title?', 'factorian-webrur'),
  32. ),
  33. // end: a field
  34.  
  35. ), // end: fields
  36. ), // end: a section
  37. ),
  38. ); // end a option
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement