api_acf_field_group_get_options

The Advanced Custom Fields api acf field group get options function.

Description

api_acf_field_group_get_options( $options, $post_id ); 

Parameters (2)

0. $options
The options.
1. $post_id
The post id.

Usage

  1. if ( !function_exists( 'api_acf_field_group_get_options' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'advanced-custom-fields/core/api.php'; 
  3.  
  4. // The options. 
  5. $options = null; 
  6.  
  7. // The post id. 
  8. $post_id = null; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = api_acf_field_group_get_options($options, $post_id); 
  12.  

Defined (1)

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

/core/api.php  
  1. function api_acf_field_group_get_options( $options, $post_id ) 
  2. // validate 
  3. if( !empty($GLOBALS['acf_register_field_group']) ) 
  4. foreach( $GLOBALS['acf_register_field_group'] as $acf ) 
  5. if( $acf['id'] == $post_id ) 
  6. $options = $acf['options']; 
  7. break; 
  8.  
  9. return $options;