cmb_get_field_value

The BuddyPress Profile Tabs cmb get field value function.

Description

cmb_get_field_value( $field_args, (int) $object_id = 0, (string) $object_type = 'post' ); 

Parameters (3)

0. $field_args
The field args.
1. $object_id — Optional. (int)
The object id.
2. $object_type — Optional. (string) => 'post'
The object type.

Usage

  1. if ( !function_exists( 'cmb_get_field_value' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress-profile-tabs/admin/includes/CMBF/init.php'; 
  3.  
  4. // The field args. 
  5. $field_args = null; 
  6.  
  7. // The object id. 
  8. $object_id = -1; 
  9.  
  10. // The object type. 
  11. $object_type = 'post'; 
  12.  
  13. // NOTICE! Understand what this does before running. 
  14. $result = cmb_get_field_value($field_args, $object_id, $object_type); 
  15.  

Defined (1)

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

/admin/includes/CMBF/init.php  
  1. function cmb_get_field_value( $field_args, $object_id = 0, $object_type = 'post' ) { 
  2. $field = cmb_get_field( $field_args, $object_id, $object_type ); 
  3. return $field->escaped_value();