Ticket #18301: 18301.diff

File 18301.diff, 1.2 KB (added by PeteMall, 21 months ago)

Activate themes form the network admin site-themes page.

Line 
1Index: wp-admin/includes/class-wp-ms-themes-list-table.php
2===================================================================
3--- wp-admin/includes/class-wp-ms-themes-list-table.php (revision 18565)
4+++ wp-admin/includes/class-wp-ms-themes-list-table.php (working copy)
5@@ -284,6 +284,9 @@
6                else
7                        $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>';
8 
9+               if ( $this->is_site_themes )
10+                       $actions['activate'] = '<a href="' . esc_url( wp_nonce_url( get_admin_url( $this->site_id, 'themes.php?action=activate&template=' . $theme['Template'] . '&amp;stylesheet=' . $theme_key ), 'switch-theme_' . $theme['Template'] ) ) . '" title="' . esc_attr__('Activate this theme') . '">' .  __( 'Activate' ) . '</a>';
11+
12                if ( current_user_can('edit_themes') )
13                        $actions['edit'] = '<a href="' . esc_url('theme-editor.php?theme=' . urlencode( $theme['Name'] )) . '" title="' . esc_attr__('Open this theme in the Theme Editor') . '" class="edit">' . __('Edit') . '</a>';
14