Make WordPress Core


Ignore:
Timestamp:
10/02/2015 07:07:23 PM (9 years ago)
Author:
jeremyfelt
Message:

MS: Use *_network_option() functions throughout core.

Replaces all uses of *_site_option() with the corresponding "network" function.

This excludes one usage in wp-admin/admin-footer.php that needs more investigation.

Props spacedmonkey.
See #28290.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/network/themes.php

    r33734 r34778  
    3030
    3131if ( $action ) {
    32     $allowed_themes = get_site_option( 'allowedthemes' );
     32    $allowed_themes = get_network_option( 'allowedthemes' );
    3333    switch ( $action ) {
    3434        case 'enable':
    3535            check_admin_referer('enable-theme_' . $_GET['theme']);
    3636            $allowed_themes[ $_GET['theme'] ] = true;
    37             update_site_option( 'allowedthemes', $allowed_themes );
     37            update_network_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_site_option( 'allowedthemes', $allowed_themes );
     46            update_network_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_site_option( 'allowedthemes', $allowed_themes );
     58            update_network_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_site_option( 'allowedthemes', $allowed_themes );
     70            update_network_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.