transient_(transient) filter-hookWP 2.8.0

Filters an existing transient's value.

The dynamic portion of the hook name, $transient, refers to the transient name.

Usage

add_filter( 'transient_(transient)', 'wp_kama_transient_filter', 10, 2 );

/**
 * Function for `transient_(transient)` filter-hook.
 * 
 * @param mixed  $value     Value of transient.
 * @param string $transient Transient name.
 *
 * @return mixed
 */
function wp_kama_transient_filter( $value, $transient ){

	// filter...
	return $value;
}
$value(mixed)
Value of transient.
$transient(string)
Transient name.

Changelog

Since 2.8.0 Introduced.
Since 4.4.0 The $transient parameter was added

Where the hook is called

get_transient()
transient_(transient)
wp-includes/option.php 1254
return apply_filters( "transient_{$transient}", $value, $transient );

Where the hook is used in WordPress

Usage not found.