set_site_transient_{$transient}
Action HookDescription
Fires after the value for a specific site transient has been set. The dynamic portion of the hook name, `$transient`, refers to the transient name.Hook Information
File Location |
wp-includes/option.php
View on GitHub
|
Hook Type | Action |
Line Number | 2686 |
Hook Parameters
Type | Name | Description |
---|---|---|
mixed
|
$value
|
Site transient value. |
int
|
$expiration
|
Time until expiration in seconds. |
string
|
$transient
|
Transient name. |
Usage Examples
Basic Usage
<?php
// Hook into set_site_transient_{$transient}
add_action('set_site_transient_{$transient}', 'my_custom_function', 10, 3);
function my_custom_function($value, $expiration, $transient) {
// Your custom code here
}
Source Code Context
wp-includes/option.php:2686
- How this hook is used in WordPress core
<?php
2681 *
2682 * @param mixed $value Site transient value.
2683 * @param int $expiration Time until expiration in seconds.
2684 * @param string $transient Transient name.
2685 */
2686 do_action( "set_site_transient_{$transient}", $value, $expiration, $transient );
2687
2688 /**
2689 * Fires after the value for a site transient has been set.
2690 *
2691 * @since 6.8.0
PHP Documentation
<?php
/**
* Fires after the value for a specific site transient has been set.
*
* The dynamic portion of the hook name, `$transient`, refers to the transient name.
*
* @since 3.0.0
* @since 4.4.0 The `$transient` parameter was added
*
* @param mixed $value Site transient value.
* @param int $expiration Time until expiration in seconds.
* @param string $transient Transient name.
*/
Quick Info
- Hook Type: Action
- Parameters: 3
- File: wp-includes/option.php
Related Hooks
Related hooks will be displayed here in future updates.