acf/get_cache_key filter-hookACF 5.7.11

Filters the cache key.

Usage

add_filter( 'acf/get_cache_key', 'wp_kama_acf_get_cache_key_filter', 10, 2 );

/**
 * Function for `acf/get_cache_key` filter-hook.
 * 
 * @param string $key          The cache key.
 * @param string $original_key The original cache key.
 *
 * @return string
 */
function wp_kama_acf_get_cache_key_filter( $key, $original_key ){
	// filter...
	return $key;
}
$key(string)
The cache key.
$original_key(string)
The original cache key.

Changelog

Since 5.7.11 Introduced.

Where the hook is called

acf_cache_key()
acf/get_cache_key
acf/includes/acf-helper-functions.php 107
return apply_filters( 'acf/get_cache_key', $key, $key );

Where the hook is used in Advanced Custom Fields PRO

acf/includes/l10n.php 156
add_filter( 'acf/get_cache_key', '_acf_apply_language_cache_key' );