From 4099310ff5d9453714c76b8e71e0cd9916cc16ae Mon Sep 17 00:00:00 2001 From: "Dominik Schilling (ocean90)" Date: Tue, 6 Oct 2015 17:58:19 +0000 Subject: [PATCH] Transients: Rename filters added in [34865]. * `expiration_pre_set_transient_$transient` => `expiration_of_transient_$transient` * `expiration_pre_set_site_transient_$transient` => `expiration_of_site_transient_$transient` Fix hook docs. Props chriscct7. Fixes #21330. git-svn-id: https://develop.svn.wordpress.org/trunk@34877 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/option.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/wp-includes/option.php b/src/wp-includes/option.php index 4ee24fdf4b..2112970871 100644 --- a/src/wp-includes/option.php +++ b/src/wp-includes/option.php @@ -702,11 +702,11 @@ function set_transient( $transient, $value, $expiration = 0 ) { * * @since 4.4.0 * - * @param mixed $value New value of transient. * @param int $expiration Time until expiration in seconds. + * @param mixed $value New value of transient. * @param string $transient Transient name. */ - $expiration = apply_filters( 'expiration_pre_set_transient_' . $transient, $expiration, $value, $transient ); + $expiration = apply_filters( 'expiration_of_transient_' . $transient, $expiration, $value, $transient ); if ( wp_using_ext_object_cache() ) { $result = wp_cache_set( $transient, $value, 'transient', $expiration ); @@ -1523,7 +1523,7 @@ function get_site_transient( $transient ) { * returning the passed value instead. * * @since 2.9.0 - * @since 4.4.0 The `$transient` parameter was added + * @since 4.4.0 The `$transient` parameter was added. * * @param mixed $pre_site_transient The default value to return if the site transient does not exist. * Any value other than false will short-circuit the retrieval @@ -1561,7 +1561,7 @@ function get_site_transient( $transient ) { * The dynamic portion of the hook name, `$transient`, refers to the transient name. * * @since 2.9.0 - * @since 4.4.0 The `$transient` parameter was added + * @since 4.4.0 The `$transient` parameter was added. * * @param mixed $value Value of site transient. * @param string $transient Transient name. @@ -1593,9 +1593,9 @@ function set_site_transient( $transient, $value, $expiration = 0 ) { * 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 + * @since 4.4.0 The `$transient` parameter was added. * - * @param mixed $value Value of site transient. + * @param mixed $value New value of site transient. * @param string $transient Transient name. */ $value = apply_filters( 'pre_set_site_transient_' . $transient, $value, $transient ); @@ -1609,11 +1609,11 @@ function set_site_transient( $transient, $value, $expiration = 0 ) { * * @since 4.4.0 * - * @param mixed $value New value of transient. * @param int $expiration Time until expiration in seconds. + * @param mixed $value New value of site transient. * @param string $transient Transient name. */ - $expiration = apply_filters( 'expiration_pre_set_site_transient_' . $transient, $expiration, $value, $transient ); + $expiration = apply_filters( 'expiration_of_site_transient_' . $transient, $expiration, $value, $transient ); if ( wp_using_ext_object_cache() ) { $result = wp_cache_set( $transient, $value, 'site-transient', $expiration ); @@ -1658,4 +1658,4 @@ function set_site_transient( $transient, $value, $expiration = 0 ) { do_action( 'setted_site_transient', $transient, $value, $expiration ); } return $result; -} \ No newline at end of file +}