pre_set_transient_(transient) хук-фильтр . WP 3.0.0
Filters a specific transient before its value is set.
The dynamic portion of the hook name, $transient, refers to the transient name.
Использование
add_filter( 'pre_set_transient_(transient)', 'filter_function_name_4756', 10, 3 ); function filter_function_name_4756( $value, $expiration, $transient ){ // filter... return $value; }
- $value(смешанный)
- New value of transient.
- $expiration(число)
- Time until expiration in seconds.
- $transient(строка)
- Transient name.
Список изменений
С версии 3.0.0 | Введена. |
С версии 4.2.0 | The $expiration parameter was added. |
С версии 4.4.0 | The $transient parameter was added. |
Где вызывается хук
pre_set_transient_(transient)
wp-includes/option.php 860
$value = apply_filters( "pre_set_transient_{$transient}", $value, $expiration, $transient );