mirror of
git://develop.git.wordpress.org/
synced 2025-03-28 15:52:31 +01:00
Options/Meta APIs: Rename setted_(site_)_transient
to set_...
.
Deprecate the actions `setted_transient` and `setted_site_transient` in favour of `set_transient` and `set_site_transient` respectively. This serves two purposes, the name is consistent with the transient specific actions `set_(site_)_transient_{$transient}`, and to make the names grammatically correct. Props sukhendu2002, swissspidy, johnbillion, peterwilsoncc. Fixes #62849. git-svn-id: https://develop.svn.wordpress.org/trunk@59735 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
d11377e16e
commit
01e553b0b6
@ -1596,14 +1596,26 @@ function set_transient( $transient, $value, $expiration = 0 ) {
|
|||||||
/**
|
/**
|
||||||
* Fires after the value for a transient has been set.
|
* Fires after the value for a transient has been set.
|
||||||
*
|
*
|
||||||
* @since 3.0.0
|
* @since 6.8.0
|
||||||
* @since 3.6.0 The `$value` and `$expiration` parameters were added.
|
|
||||||
*
|
*
|
||||||
* @param string $transient The name of the transient.
|
* @param string $transient The name of the transient.
|
||||||
* @param mixed $value Transient value.
|
* @param mixed $value Transient value.
|
||||||
* @param int $expiration Time until expiration in seconds.
|
* @param int $expiration Time until expiration in seconds.
|
||||||
*/
|
*/
|
||||||
do_action( 'setted_transient', $transient, $value, $expiration );
|
do_action( 'set_transient', $transient, $value, $expiration );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fires after the transient is set.
|
||||||
|
*
|
||||||
|
* @since 3.0.0
|
||||||
|
* @since 3.6.0 The `$value` and `$expiration` parameters were added.
|
||||||
|
* @deprecated 6.8.0 Use {@see 'set_transient'} instead.
|
||||||
|
*
|
||||||
|
* @param string $transient The name of the transient.
|
||||||
|
* @param mixed $value Transient value.
|
||||||
|
* @param int $expiration Time until expiration in seconds.
|
||||||
|
*/
|
||||||
|
do_action_deprecated( 'setted_transient', array( $transient, $value, $expiration ), '6.8.0', 'set_transient' );
|
||||||
}
|
}
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
@ -2676,13 +2688,25 @@ function set_site_transient( $transient, $value, $expiration = 0 ) {
|
|||||||
/**
|
/**
|
||||||
* Fires after the value for a site transient has been set.
|
* Fires after the value for a site transient has been set.
|
||||||
*
|
*
|
||||||
* @since 3.0.0
|
* @since 6.8.0
|
||||||
*
|
*
|
||||||
* @param string $transient The name of the site transient.
|
* @param string $transient The name of the site transient.
|
||||||
* @param mixed $value Site transient value.
|
* @param mixed $value Site transient value.
|
||||||
* @param int $expiration Time until expiration in seconds.
|
* @param int $expiration Time until expiration in seconds.
|
||||||
*/
|
*/
|
||||||
do_action( 'setted_site_transient', $transient, $value, $expiration );
|
do_action( 'set_site_transient', $transient, $value, $expiration );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fires after the value for a site transient has been set.
|
||||||
|
*
|
||||||
|
* @since 3.0.0
|
||||||
|
* @deprecated 6.8.0 Use {@see 'set_site_transient'} instead.
|
||||||
|
*
|
||||||
|
* @param string $transient The name of the site transient.
|
||||||
|
* @param mixed $value Site transient value.
|
||||||
|
* @param int $expiration Time until expiration in seconds.
|
||||||
|
*/
|
||||||
|
do_action_deprecated( 'setted_site_transient', array( $transient, $value, $expiration ), '6.8.0', 'set_site_transient' );
|
||||||
}
|
}
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user