cmb_print_metabox

The BuddyPress Profile Tabs cmb print metabox function.

Description

cmb_print_metabox( $meta_box, $object_id ); 

Parameters (2)

0. $meta_box
The meta box.
1. $object_id
The object id.

Usage

  1. if ( !function_exists( 'cmb_print_metabox' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress-profile-tabs/admin/includes/CMBF/init.php'; 
  3.  
  4. // The meta box. 
  5. $meta_box = null; 
  6.  
  7. // The object id. 
  8. $object_id = null; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = cmb_print_metabox($meta_box, $object_id); 
  12.  

Defined (1)

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

/admin/includes/CMBF/init.php  
  1. function cmb_print_metabox( $meta_box, $object_id ) { 
  2. $cmb = new cmb_Meta_Box( $meta_box ); 
  3. if ( $cmb ) { 
  4.  
  5. cmb_Meta_Box::set_object_id( $object_id ); 
  6.  
  7. if ( ! wp_script_is( 'cmb-scripts', 'registered' ) ) 
  8. $cmb->register_scripts(); 
  9.  
  10. wp_enqueue_script( 'cmb-scripts' ); 
  11.  
  12. // default is to show cmb styles 
  13. if ( $meta_box['cmb_styles'] != false ) 
  14. wp_enqueue_style( 'cmb-styles' ); 
  15.  
  16. cmb_Meta_Box::show_form( $meta_box ); 
  17.