set_transient_(transient)
Fires after the value for a specific transient has been set.
The dynamic portion of the hook name, $transient, refers to the transient name.
Использование
add_action( 'set_transient_(transient)', 'wp_kama_set_transient_action', 10, 3 ); /** * Function for `set_transient_(transient)` action-hook. * * @param mixed $value Transient value. * @param int $expiration Time until expiration in seconds. * @param string $transient The name of the transient. * * @return void */ function wp_kama_set_transient_action( $value, $expiration, $transient ){ // action... }
- $value(разное)
- Transient value.
- $expiration(int)
- Time until expiration in seconds.
- $transient(строка)
- The name of the transient.
Список изменений
С версии 3.0.0 | Введена. |
С версии 3.6.0 | The $value and $expiration parameters were added. |
С версии 4.4.0 | The $transient parameter was added. |
Где вызывается хук
set_transient_(transient)
wp-includes/option.php 1356
do_action( "set_transient_{$transient}", $value, $expiration, $transient );