Make WordPress Core

Ticket #14897: 14897.2.diff

File 14897.2.diff, 977 bytes (added by PeteMall, 15 years ago)

Remove unused code.

  • wp-admin/network/edit.php

     
    300300                exit();
    301301        break;
    302302
    303         // Themes
    304     case 'updatethemes':
    305         if ( ! current_user_can( 'manage_network_themes' ) )
    306                 wp_die( __( 'You do not have permission to access this page.' ) );
    307 
    308         if ( is_array( $_POST['theme'] ) ) {
    309                         $themes = get_themes();
    310                         reset( $themes );
    311                         $allowed_themes = array();
    312                         foreach ( (array) $themes as $key => $theme ) {
    313                                 if ( $_POST['theme'][ esc_html( $theme['Stylesheet'] ) ] == 'enabled' )
    314                                         $allowed_themes[ esc_html( $theme['Stylesheet'] ) ] = true;
    315                         }
    316                         update_site_option( 'allowedthemes', $allowed_themes );
    317                 }
    318                 wp_redirect( add_query_arg( array( 'updated' => 'true', 'action' => 'themes' ),  wp_get_referer() ) );
    319                 exit();
    320         break;
    321 
    322303        // Common
    323304        case 'confirm':
    324305                if ( !headers_sent() ) {