acf/is_(hook_name)_key filter-hookACF 5.7.10

Filters whether the $id is an ACF post key.

Usage

add_filter( 'acf/is_(hook_name)_key', 'wp_kama_acf_is_hook_name_key_filter', 10, 3 );

/**
 * Function for `acf/is_(hook_name)_key` filter-hook.
 * 
 * @param bool   $bool      The result.
 * @param string $id        The identifier.
 * @param        $post_type 
 *
 * @return bool
 */
function wp_kama_acf_is_hook_name_key_filter( $bool, $id, $post_type ){

	// filter...
	return $bool;
}
$bool(true|false)
The result.
$id(string)
The identifier.
$post_type
-

Changelog

Since 5.7.10 Introduced.

Where the hook is called

ACF_Internal_Post_Type::is_post_key()
acf/is_(hook_name)_key
acf/includes/class-acf-internal-post-type.php 253
return apply_filters( "acf/is_{$this->hook_name}_key", false, $id, $this->post_type );

Where the hook is used in Advanced Custom Fields PRO

acf/includes/local-fields.php 683
add_filter( 'acf/is_field_key', '_acf_apply_is_local_field_key', 20, 2 );
acf/includes/local-fields.php 716
add_filter( 'acf/is_field_group_key', '_acf_apply_is_local_internal_post_type_key', 20, 3 );
acf/includes/local-fields.php 717
add_filter( 'acf/is_post_type_key', '_acf_apply_is_local_internal_post_type_key', 20, 3 );
acf/includes/local-fields.php 718
add_filter( 'acf/is_taxonomy_key', '_acf_apply_is_local_internal_post_type_key', 20, 3 );