Make WordPress Core


Ignore:
Timestamp:
12/24/2010 05:41:36 PM (14 years ago)
Author:
ryan
Message:

MS themes fixes. Fix bulk actions when no items selected. Props SergeyBiryukov, nacin. fixes #15920

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/class-wp-ms-themes-list-table.php

    r17129 r17130  
    7979
    8080        foreach ( (array) $themes['all'] as $key => $theme ) {
    81             $theme_key = esc_html( $theme['Stylesheet'] );
     81            $theme_key = $theme['Stylesheet'];
    8282
    8383            if ( isset( $allowed_themes [ $theme_key ] ) )  {
     
    277277        );
    278278
    279         $theme_key = esc_html( $theme['Stylesheet'] );
     279        $theme_key = $theme['Stylesheet'];
    280280
    281281        if ( empty( $theme['enabled'] ) )
     
    286286        if ( current_user_can('edit_themes') )
    287287            $actions['edit'] = '<a href="' . esc_url('theme-editor.php?theme=' . $theme['Name'] ) . '" title="' . esc_attr__('Open this theme in the Theme Editor') . '" class="edit">' . __('Edit') . '</a>';
    288            
    289         if ( empty( $theme['enabled'] ) && current_user_can( 'delete_themes' ) && ! $this->is_site_themes )
     288
     289        if ( empty( $theme['enabled'] ) && current_user_can( 'delete_themes' ) && ! $this->is_site_themes && $theme_key != get_option( 'stylesheet' ) && $theme_key != get_option( 'template' ) )
    290290            $actions['delete'] = '<a href="' . esc_url( wp_nonce_url( 'themes.php?action=delete-selected&amp;checked[]=' . $theme_key . '&amp;theme_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s, 'bulk-themes' ) ) . '" title="' . esc_attr__( 'Delete this theme' ) . '" class="delete">' . __( 'Delete' ) . '</a>';
    291291
Note: See TracChangeset for help on using the changeset viewer.