WordPress.org

Make WordPress Core


Ignore:
Timestamp:
11/08/2010 09:52:54 PM (10 years ago)
Author:
ryan
Message:

site-themes.php cleanup. Props PeteMall. see #14897

File:
1 edited

Legend:

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

    r16241 r16242  
    1818
    1919// Clean up request URI from temporary args for screen options/paging uri's to work as expected.
    20 $_SERVER['REQUEST_URI'] = remove_query_arg(array('network-enable', 'network-disable', 'network-enable-selected', 'network-disable-selected'), $_SERVER['REQUEST_URI']);
     20$_SERVER['REQUEST_URI'] = remove_query_arg(array('enable', 'disable', 'enable-selected', 'disable-selected'), $_SERVER['REQUEST_URI']);
    2121
    2222if ( $action ) {
    2323    $allowed_themes = get_site_option( 'allowedthemes' );   
    2424    switch ( $action ) {
    25         case 'network-enable':
     25        case 'enable':
    2626            $allowed_themes[ $_GET['theme'] ] = true;
    2727            update_site_option( 'allowedthemes', $allowed_themes );
     
    2929            exit;           
    3030            break;
    31         case 'network-disable':
     31        case 'disable':
    3232            unset( $allowed_themes[ $_GET['theme'] ] );
    3333            update_site_option( 'allowedthemes', $allowed_themes );
     
    3535            exit;
    3636            break;
    37         case 'network-enable-selected':
     37        case 'enable-selected':
    3838            $themes = isset( $_POST['checked'] ) ? (array) $_POST['checked'] : array();
    3939            if ( empty($themes) ) {
     
    4545            update_site_option( 'allowedthemes', $allowed_themes );
    4646            break;
    47         case 'network-disable-selected':
     47        case 'disable-selected':
    4848            $themes = isset( $_POST['checked'] ) ? (array) $_POST['checked'] : array();
    4949            if ( empty($themes) ) {
     
    8282<?php screen_icon('themes'); ?>
    8383<h2><?php echo esc_html( $title ); if ( current_user_can('install_themes') ) { ?> <a href="theme-install.php" class="button add-new-h2"><?php echo esc_html_x('Add New', 'theme'); ?></a><?php } ?></h2>
    84 <p><?php _e( 'Themes must be enabled for your network before they will be available to individual sites.' ) ?></p>
    8584
    8685<form method="get" action="">
Note: See TracChangeset for help on using the changeset viewer.