PREFIX_register_meta_boxes

Register meta boxes.

Description

PREFIX_register_meta_boxes(); 

Usage

  1. if ( !function_exists( 'PREFIX_register_meta_boxes' ) ) { 
  2. require_once '/meta-box/demo/field-taxonomy.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = PREFIX_register_meta_boxes(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/meta-box/demo/field-taxonomy.php  
  1. function PREFIX_register_meta_boxes() 
  2. if ( ! class_exists( 'RW_Meta_Box' ) ) 
  3. return; 
  4.  
  5. $prefix = 'YOUR_PREFIX_'; 
  6. $tax_box = array( 
  7. 'id' => 'taxonomy-test',  
  8. 'title' => 'Taxonomy Test',  
  9. 'fields' => array( 
  10. // Taxonomy 
  11. array( 
  12. 'name' => 'Categories',  
  13. 'id' => "{$prefix}cats",  
  14. 'type' => 'taxonomy',  
  15. 'options' => array( 
  16. // Taxonomy name 
  17. 'taxonomy' => 'category',  
  18. // How to show taxonomy: 'checkbox_list' (default) or 'checkbox_tree', 'select_tree' or 'select'. Optional 
  19. 'type' => 'checkbox_tree',  
  20. // Additional arguments for get_terms() function 
  21. 'args' => array() 
  22. ),  
  23. 'desc' => 'Choose One Category' 
  24. ); 
  25.  
  26. new RW_Meta_Box( $tax_box );