From f5d2e0dd612750fc922b7ff2dd20c2a3f370badc Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Mon, 12 Oct 2015 21:01:24 +0000 Subject: [PATCH] Add `$transient` as a parameter to the `set_transient_{transient}` action. Props SergeyBiryukov Fixes #34269 git-svn-id: https://develop.svn.wordpress.org/trunk@35082 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/option.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/wp-includes/option.php b/src/wp-includes/option.php index e0e69aa519..4ac5a16eae 100644 --- a/src/wp-includes/option.php +++ b/src/wp-includes/option.php @@ -748,16 +748,20 @@ function set_transient( $transient, $value, $expiration = 0 ) { * The dynamic portion of the hook name, `$transient`, refers to the transient name. * * @since 3.0.0 + * @since 3.6.0 The `$value` and `$expiration` parameters were added. + * @since 4.4.0 The `$transient` parameter was added. * - * @param mixed $value Transient value. - * @param int $expiration Time until expiration in seconds. Default 0. + * @param mixed $value Transient value. + * @param int $expiration Time until expiration in seconds. Default 0. + * @param string $transient The name of the transient. */ - do_action( 'set_transient_' . $transient, $value, $expiration ); + do_action( 'set_transient_' . $transient, $value, $expiration, $transient ); /** * Fires after the value for a transient has been set. * * @since 3.0.0 + * @since 3.6.0 The `$value` and `$expiration` parameters were added. * * @param string $transient The name of the transient. * @param mixed $value Transient value.