api_acf_field_group_get_options
The Advanced Custom Fields api acf field group get options function.
Description
Parameters (2)
- 0. $options
- The options.
- 1. $post_id
- The post id.
Usage
if ( !function_exists( 'api_acf_field_group_get_options' ) ) { require_once ABSPATH . PLUGINDIR . 'advanced-custom-fields/core/api.php'; } // The options. $options = null; // The post id. $post_id = null; // NOTICE! Understand what this does before running. $result = api_acf_field_group_get_options($options, $post_id);
Defined (1)
The function is defined in the following location(s).
- /core/api.php
- function api_acf_field_group_get_options( $options, $post_id )
- {
- // validate
- if( !empty($GLOBALS['acf_register_field_group']) )
- {
- foreach( $GLOBALS['acf_register_field_group'] as $acf )
- {
- if( $acf['id'] == $post_id )
- {
- $options = $acf['options'];
- break;
- }
- }
- }
- return $options;
- }