WordPress.org

Make WordPress Core

Ticket #14897: 14897.20.diff

File 14897.20.diff, 2.5 KB (added by PeteMall, 9 years ago)

s/Enable/Network Enable for net admin themes.

  • wp-admin/includes/class-wp-ms-themes-list-table.php

     
    232232
    233233                $actions = array();
    234234                if ( 'enabled' != $status )
    235                         $actions['enable-selected'] = __( 'Enable' );
     235                        $actions['enable-selected'] = $this->is_site_themes ? __( 'Enable' ) : __( 'Network Enable' );
    236236                if ( 'disabled' != $status )
    237                         $actions['disable-selected'] = __( 'Disable' );
     237                        $actions['disable-selected'] = $this->is_site_themes ? __( 'Disable' ) : __( 'Network Disable' );
    238238                if ( current_user_can( 'update_themes' ) && !$this->is_site_themes )
    239239                        $actions['update-selected'] = __( 'Update' );
    240240
     
    260260
    261261                $context = $status;
    262262
    263                 if ( $this->is_site_themes )
     263                if ( $this->is_site_themes ) {
    264264                        $url = "site-themes.php?id={$this->site_id}&";
    265                 else
     265                        $label = array( 'enable' => __( 'Enable' ), 'disable' => __( 'Disable' ) );
     266                } else {
    266267                        $url = 'themes.php?';
     268                        $label = array( 'enable' => __( 'Network Enable' ), 'disable' => __( 'Network Disable' ) );
     269                }
    267270
    268271                // preorder
    269272                $actions = array(
     
    275278                $theme_key = esc_html( $theme['Stylesheet'] );
    276279
    277280                if ( empty( $theme['enabled'] ) )
    278                         $actions['enable'] = '<a href="' . wp_nonce_url($url . 'action=enable&amp;theme=' . $theme_key . '&amp;paged=' . $page . '&amp;s=' . $s, 'enable-theme_' . $theme_key) . '" title="' . __('Enable this theme') . '" class="edit">' . __('Enable') . '</a>';
     281                        $actions['enable'] = '<a href="' . wp_nonce_url($url . 'action=enable&amp;theme=' . $theme_key . '&amp;paged=' . $page . '&amp;s=' . $s, 'enable-theme_' . $theme_key) . '" title="' . __('Enable this theme') . '" class="edit">' . $label['enable'] . '</a>';
    279282                else
    280                         $actions['disable'] = '<a href="' . wp_nonce_url($url . 'action=disable&amp;theme=' . $theme_key . '&amp;paged=' . $page . '&amp;s=' . $s, 'disable-theme_' . $theme_key) . '" title="' . __('Disable this theme') . '">' . __('Disable') . '</a>';
     283                        $actions['disable'] = '<a href="' . wp_nonce_url($url . 'action=disable&amp;theme=' . $theme_key . '&amp;paged=' . $page . '&amp;s=' . $s, 'disable-theme_' . $theme_key) . '" title="' . __('Disable this theme') . '">' . $label['disable'] . '</a>';
    281284
    282285                if ( current_user_can('edit_themes') )
    283286                        $actions['edit'] = '<a href="theme-editor.php?theme=' . $theme['Name'] . '" title="' . __('Open this theme in the Theme Editor') . '" class="edit">' . __('Edit') . '</a>';