Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename 'setted_transient' action to 'set_transient' #8185

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 26 additions & 2 deletions src/wp-includes/option.php
Original file line number Diff line number Diff line change
Expand Up @@ -1596,14 +1596,26 @@ function set_transient( $transient, $value, $expiration = 0 ) {
/**
* Fires after the value for a transient has been set.
*
* @since 6.8.0
*
* @param string $transient The name of the transient.
* @param mixed $value Transient value.
* @param int $expiration Time until expiration in seconds.
*/
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( 'setted_transient', $transient, $value, $expiration );
do_action_deprecated( 'setted_transient', array( $transient, $value, $expiration ), '6.8.0', 'set_transient' );
peterwilsoncc marked this conversation as resolved.
Show resolved Hide resolved
}

return $result;
Expand Down Expand Up @@ -2673,16 +2685,28 @@ function set_site_transient( $transient, $value, $expiration = 0 ) {
*/
do_action( "set_site_transient_{$transient}", $value, $expiration, $transient );

/**
* Fires after the value for a site transient has been set.
*
* @since 6.8.0
*
* @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( '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( 'setted_site_transient', $transient, $value, $expiration );
do_action_deprecated( 'setted_site_transient', array( $transient, $value, $expiration ), '6.8.0', 'set_site_transient' );
}

return $result;
Expand Down
Loading