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
This commit is contained in:
Dion Hulse 2013-09-11 08:46:10 +00:00
parent 26ebfca466
commit fc1fc39a89
1 changed files with 4 additions and 4 deletions

View File

@ -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 ) {