From fc1fc39a8977cef81e78a8f89e266db9989b8b1e Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Wed, 11 Sep 2013 08:46:10 +0000 Subject: [PATCH] Fix the action that `set_site_transient()` fires so as not to include the private option prefix. This brings set_site_transient() back in line with it's documented behaviour, and the behaviour of all other transient functions. Fixes #25213 Built from https://develop.svn.wordpress.org/trunk@25350 git-svn-id: http://core.svn.wordpress.org/trunk@25312 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/option.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wp-includes/option.php b/wp-includes/option.php index 6408303e22..b5b2e4a58e 100644 --- a/wp-includes/option.php +++ b/wp-includes/option.php @@ -1054,15 +1054,15 @@ function set_site_transient( $transient, $value, $expiration = 0 ) { $result = wp_cache_set( $transient, $value, 'site-transient', $expiration ); } else { $transient_timeout = '_site_transient_timeout_' . $transient; - $transient = '_site_transient_' . $transient; - if ( false === get_site_option( $transient ) ) { + $option = '_site_transient_' . $transient; + if ( false === get_site_option( $option ) ) { if ( $expiration ) add_site_option( $transient_timeout, time() + $expiration ); - $result = add_site_option( $transient, $value ); + $result = add_site_option( $option, $value ); } else { if ( $expiration ) update_site_option( $transient_timeout, time() + $expiration ); - $result = update_site_option( $transient, $value ); + $result = update_site_option( $option, $value ); } } if ( $result ) {