WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/07/2015 05:11:01 PM (5 years ago)
Author:
jeremyfelt
Message:

Revert [34778], continue using _site_option() for the current network.

The _network_option() parameter order will be changing to accept $network_id first. The _site_option() functions will remain in use throughout core as our way of retrieving a network option for the current network.

See #28290.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/update.php

    r34778 r34912  
    3030function get_core_updates( $options = array() ) {
    3131    $options = array_merge( array( 'available' => true, 'dismissed' => false ), $options );
    32     $dismissed = get_network_option( 'dismissed_update_core' );
     32    $dismissed = get_site_option( 'dismissed_update_core' );
    3333
    3434    if ( ! is_array( $dismissed ) )
     
    135135 */
    136136function dismiss_core_update( $update ) {
    137     $dismissed = get_network_option( 'dismissed_update_core' );
     137    $dismissed = get_site_option( 'dismissed_update_core' );
    138138    $dismissed[ $update->current . '|' . $update->locale ] = true;
    139     return update_network_option( 'dismissed_update_core', $dismissed );
     139    return update_site_option( 'dismissed_update_core', $dismissed );
    140140}
    141141
     
    147147 */
    148148function undismiss_core_update( $version, $locale ) {
    149     $dismissed = get_network_option( 'dismissed_update_core' );
     149    $dismissed = get_site_option( 'dismissed_update_core' );
    150150    $key = $version . '|' . $locale;
    151151
     
    154154
    155155    unset( $dismissed[$key] );
    156     return update_network_option( 'dismissed_update_core', $dismissed );
     156    return update_site_option( 'dismissed_update_core', $dismissed );
    157157}
    158158
     
    479479    $nag = isset( $upgrading );
    480480    if ( ! $nag ) {
    481         $failed = get_network_option( 'auto_core_update_failed' );
     481        $failed = get_site_option( 'auto_core_update_failed' );
    482482        /*
    483483         * If an update failed critically, we may have copied over version.php but not other files.
Note: See TracChangeset for help on using the changeset viewer.