mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
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
git-svn-id: https://develop.svn.wordpress.org/trunk@25350 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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 ) {
|
||||
|
||||
Reference in New Issue
Block a user