set_transient
Fires after the value for a transient has been set.
Usage
add_action( 'set_transient', 'wp_kama_set_transient_action', 10, 3 ); /** * Function for `set_transient` action-hook. * * @param string $transient The name of the transient. * @param mixed $value Transient value. * @param int $expiration Time until expiration in seconds. * * @return void */ function wp_kama_set_transient_action( $transient, $value, $expiration ){ // action... }
- $transient(string)
- The name of the transient.
- $value(mixed)
- Transient value.
- $expiration(int)
- Time until expiration in seconds.
Changelog
Since 6.8.0 | Introduced. |
Where the hook is called
set_transient
wp-includes/option.php 1605
do_action( 'set_transient', $transient, $value, $expiration );