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/network/themes.php

    r34891 r34912  
    3030
    3131if ( $action ) {
    32     $allowed_themes = get_network_option( 'allowedthemes' );
     32    $allowed_themes = get_site_option( 'allowedthemes' );
    3333    switch ( $action ) {
    3434        case 'enable':
    3535            check_admin_referer('enable-theme_' . $_GET['theme']);
    3636            $allowed_themes[ $_GET['theme'] ] = true;
    37             update_network_option( 'allowedthemes', $allowed_themes );
     37            update_site_option( 'allowedthemes', $allowed_themes );
    3838            if ( false === strpos( $referer, '/network/themes.php' ) )
    3939                wp_redirect( network_admin_url( 'themes.php?enabled=1' ) );
     
    4444            check_admin_referer('disable-theme_' . $_GET['theme']);
    4545            unset( $allowed_themes[ $_GET['theme'] ] );
    46             update_network_option( 'allowedthemes', $allowed_themes );
     46            update_site_option( 'allowedthemes', $allowed_themes );
    4747            wp_safe_redirect( add_query_arg( 'disabled', '1', $referer ) );
    4848            exit;
     
    5656            foreach ( (array) $themes as $theme )
    5757                $allowed_themes[ $theme ] = true;
    58             update_network_option( 'allowedthemes', $allowed_themes );
     58            update_site_option( 'allowedthemes', $allowed_themes );
    5959            wp_safe_redirect( add_query_arg( 'enabled', count( $themes ), $referer ) );
    6060            exit;
     
    6868            foreach ( (array) $themes as $theme )
    6969                unset( $allowed_themes[ $theme ] );
    70             update_network_option( 'allowedthemes', $allowed_themes );
     70            update_site_option( 'allowedthemes', $allowed_themes );
    7171            wp_safe_redirect( add_query_arg( 'disabled', count( $themes ), $referer ) );
    7272            exit;
Note: See TracChangeset for help on using the changeset viewer.