api_acf_field_group_get_location

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

Description

api_acf_field_group_get_location( $location, $post_id ); 

Parameters (2)

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

Usage

  1. if ( !function_exists( 'api_acf_field_group_get_location' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'advanced-custom-fields/core/api.php'; 
  3.  
  4. // The location. 
  5. $location = 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_location($location, $post_id); 
  12.  

Defined (1)

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

/core/api.php  
  1. function api_acf_field_group_get_location( $location, $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. $location = $acf['location']; 
  7. break; 
  8.  
  9. return $location;