Make WordPress Core

Ticket #20099: 20099.patch

File 20099.patch, 2.7 KB (added by ocean90, 13 years ago)
  • wp-admin/includes/class-wp-ms-themes-list-table.php

     
    233233                global $status;
    234234
    235235                $actions = array();
    236                 if ( 'enabled' != $status )
    237                         $actions['enable-selected'] = $this->is_site_themes ? __( 'Enable' ) : __( 'Network Enable' );
    238                 if ( 'disabled' != $status )
    239                         $actions['disable-selected'] = $this->is_site_themes ? __( 'Disable' ) : __( 'Network Disable' );
     236                if ( 'broken' != $status ) {
     237                        if ( 'enabled' != $status )
     238                                $actions['enable-selected'] = $this->is_site_themes ? __( 'Enable' ) : __( 'Network Enable' );
     239                        if ( 'disabled' != $status )
     240                                $actions['disable-selected'] = $this->is_site_themes ? __( 'Disable' ) : __( 'Network Disable' );
     241                }
    240242                if ( ! $this->is_site_themes ) {
    241243                        if ( current_user_can( 'delete_themes' ) )
    242244                                $actions['delete-selected'] = __( 'Delete' );
     
    283285
    284286                $theme_key = $theme->get_stylesheet();
    285287
    286                 if ( ! $allowed )
    287                         $actions['enable'] = '<a href="' . esc_url( wp_nonce_url($url . 'action=enable&amp;theme=' . $theme_key . '&amp;paged=' . $page . '&amp;s=' . $s, 'enable-theme_' . $theme_key) ) . '" title="' . esc_attr__('Enable this theme') . '" class="edit">' . ( $this->is_site_themes ? __( 'Enable' ) : __( 'Network Enable' ) ) . '</a>';
    288                 else
    289                         $actions['disable'] = '<a href="' . esc_url( wp_nonce_url($url . 'action=disable&amp;theme=' . $theme_key . '&amp;paged=' . $page . '&amp;s=' . $s, 'disable-theme_' . $theme_key) ) . '" title="' . esc_attr__('Disable this theme') . '">' . ( $this->is_site_themes ? __( 'Disable' ) : __( 'Network Disable' ) ) . '</a>';
     288                if ( 'broken' != $status ) {
     289                        if ( ! $allowed )
     290                                $actions['enable'] = '<a href="' . esc_url( wp_nonce_url($url . 'action=enable&amp;theme=' . $theme_key . '&amp;paged=' . $page . '&amp;s=' . $s, 'enable-theme_' . $theme_key) ) . '" title="' . esc_attr__('Enable this theme') . '" class="edit">' . ( $this->is_site_themes ? __( 'Enable' ) : __( 'Network Enable' ) ) . '</a>';
     291                        else
     292                                $actions['disable'] = '<a href="' . esc_url( wp_nonce_url($url . 'action=disable&amp;theme=' . $theme_key . '&amp;paged=' . $page . '&amp;s=' . $s, 'disable-theme_' . $theme_key) ) . '" title="' . esc_attr__('Disable this theme') . '">' . ( $this->is_site_themes ? __( 'Disable' ) : __( 'Network Disable' ) ) . '</a>';
     293                }
    290294
    291295                if ( current_user_can('edit_themes') )
    292296                        $actions['edit'] = '<a href="' . esc_url('theme-editor.php?theme=' .  $theme_key ) . '" title="' . esc_attr__('Open this theme in the Theme Editor') . '" class="edit">' . __('Edit') . '</a>';