diff --git wp-includes/option.php wp-includes/option.php
index 3df89c2..b983876 100644
|
|
function get_transient( $transient ) { |
456 | 456 | if ( ! defined( 'WP_INSTALLING' ) ) { |
457 | 457 | // If option is not in alloptions, it is not autoloaded and thus has a timeout |
458 | 458 | $alloptions = wp_load_alloptions(); |
459 | | if ( !isset( $alloptions[$transient_option] ) ) { |
| 459 | if ( ! isset( $alloptions[$transient_option] ) ) { |
460 | 460 | $transient_timeout = '_transient_timeout_' . $transient; |
461 | 461 | if ( get_option( $transient_timeout ) < time() ) { |
462 | 462 | delete_option( $transient_option ); |
463 | 463 | delete_option( $transient_timeout ); |
464 | | return false; |
| 464 | $value = false; |
465 | 465 | } |
466 | 466 | } |
467 | 467 | } |
468 | 468 | |
469 | | $value = get_option( $transient_option ); |
| 469 | if ( ! isset( $value ) ) |
| 470 | $value = get_option( $transient_option ); |
470 | 471 | } |
471 | 472 | |
472 | 473 | return apply_filters( 'transient_' . $transient, $value ); |
… |
… |
function get_site_transient( $transient ) { |
1001 | 1002 | if ( false !== $timeout && $timeout < time() ) { |
1002 | 1003 | delete_site_option( $transient_option ); |
1003 | 1004 | delete_site_option( $transient_timeout ); |
1004 | | return false; |
| 1005 | $value = false; |
1005 | 1006 | } |
1006 | 1007 | } |
1007 | 1008 | |
1008 | | $value = get_site_option( $transient_option ); |
| 1009 | if ( ! isset( $value ) ) |
| 1010 | $value = get_site_option( $transient_option ); |
1009 | 1011 | } |
1010 | 1012 | |
1011 | 1013 | return apply_filters( 'site_transient_' . $transient, $value ); |