acf/prevent_access_to_unknown_fields хук-фильтрACF 1.0

Check if we should trigger warning about accessing fields too early via action.

Использование

add_filter( 'acf/prevent_access_to_unknown_fields', 'wp_kama_acf_prevent_access_to_unknown_fields_filter' );

/**
 * Function for `acf/prevent_access_to_unknown_fields` filter-hook.
 * 
 * @param  $false 
 *
 * @return 
 */
function wp_kama_acf_prevent_access_to_unknown_fields_filter( $false ){

	// filter...
	return $false;
}
$false
-

Где вызывается хук

acf_get_value()
acf/prevent_access_to_unknown_fields
acf_shortcode()
acf/prevent_access_to_unknown_fields
acf/includes/acf-value-functions.php 74
if ( apply_filters( 'acf/prevent_access_to_unknown_fields', false ) || ( 'option' === $decoded['type'] && 'options' !== $decoded['id'] ) ) {
acf/includes/api/api-template.php 886
$access_already_prevented = apply_filters( 'acf/prevent_access_to_unknown_fields', false );

Где используется хук в Advanced Custom Fields PRO

acf/includes/api/api-template.php 891
add_filter( 'acf/prevent_access_to_unknown_fields', '__return_true' );
acf/includes/api/api-template.php 898
remove_filter( 'acf/prevent_access_to_unknown_fields', '__return_true' );