Changeset 34912 for trunk/src/wp-includes/option.php
- Timestamp:
- 10/07/2015 05:11:01 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/option.php
r34878 r34912 89 89 } else { // option does not exist, so we must cache its non-existence 90 90 if ( ! is_array( $notoptions ) ) { 91 $notoptions = array();91 $notoptions = array(); 92 92 } 93 93 $notoptions[$option] = true; … … 1481 1481 $option_timeout = '_site_transient_timeout_' . $transient; 1482 1482 $option = '_site_transient_' . $transient; 1483 $result = delete_ network_option( $option );1483 $result = delete_site_option( $option ); 1484 1484 if ( $result ) 1485 delete_ network_option( $option_timeout );1485 delete_site_option( $option_timeout ); 1486 1486 } 1487 1487 if ( $result ) { … … 1544 1544 if ( ! in_array( $transient, $no_timeout ) ) { 1545 1545 $transient_timeout = '_site_transient_timeout_' . $transient; 1546 $timeout = get_ network_option( $transient_timeout );1546 $timeout = get_site_option( $transient_timeout ); 1547 1547 if ( false !== $timeout && $timeout < time() ) { 1548 delete_ network_option( $transient_option );1549 delete_ network_option( $transient_timeout );1548 delete_site_option( $transient_option ); 1549 delete_site_option( $transient_timeout ); 1550 1550 $value = false; 1551 1551 } … … 1553 1553 1554 1554 if ( ! isset( $value ) ) 1555 $value = get_ network_option( $transient_option );1555 $value = get_site_option( $transient_option ); 1556 1556 } 1557 1557 … … 1621 1621 $transient_timeout = '_site_transient_timeout_' . $transient; 1622 1622 $option = '_site_transient_' . $transient; 1623 if ( false === get_ network_option( $option ) ) {1623 if ( false === get_site_option( $option ) ) { 1624 1624 if ( $expiration ) 1625 add_ network_option( $transient_timeout, time() + $expiration );1626 $result = add_ network_option( $option, $value );1625 add_site_option( $transient_timeout, time() + $expiration ); 1626 $result = add_site_option( $option, $value ); 1627 1627 } else { 1628 1628 if ( $expiration ) 1629 update_ network_option( $transient_timeout, time() + $expiration );1630 $result = update_ network_option( $option, $value );1629 update_site_option( $transient_timeout, time() + $expiration ); 1630 $result = update_site_option( $option, $value ); 1631 1631 } 1632 1632 }
Note: See TracChangeset
for help on using the changeset viewer.