equal
deleted
inserted
replaced
10 /** Load WordPress Administration Bootstrap */ |
10 /** Load WordPress Administration Bootstrap */ |
11 require_once( './admin.php' ); |
11 require_once( './admin.php' ); |
12 |
12 |
13 if ( ! is_multisite() ) |
13 if ( ! is_multisite() ) |
14 wp_die( __( 'Multisite support is not enabled.' ) ); |
14 wp_die( __( 'Multisite support is not enabled.' ) ); |
15 |
|
16 $menu_perms = get_site_option( 'menu_items', array() ); |
|
17 |
|
18 if ( empty( $menu_perms['themes'] ) && ! is_super_admin() ) |
|
19 wp_die( __( 'Cheatin’ uh?' ) ); |
|
20 |
15 |
21 if ( !current_user_can('manage_network_themes') ) |
16 if ( !current_user_can('manage_network_themes') ) |
22 wp_die( __( 'You do not have sufficient permissions to manage network themes.' ) ); |
17 wp_die( __( 'You do not have sufficient permissions to manage network themes.' ) ); |
23 |
18 |
24 $wp_list_table = _get_list_table('WP_MS_Themes_List_Table'); |
19 $wp_list_table = _get_list_table('WP_MS_Themes_List_Table'); |
179 <?php |
174 <?php |
180 require_once(ABSPATH . 'wp-admin/admin-footer.php'); |
175 require_once(ABSPATH . 'wp-admin/admin-footer.php'); |
181 exit; |
176 exit; |
182 } // Endif verify-delete |
177 } // Endif verify-delete |
183 |
178 |
184 foreach ( $themes as $theme ) |
179 foreach ( $themes as $theme ) { |
185 $delete_result = delete_theme( $theme, esc_url( add_query_arg( array('verify-delete' => 1), $_SERVER['REQUEST_URI'] ) ) ); |
180 $delete_result = delete_theme( $theme, esc_url( add_query_arg( array( |
|
181 'verify-delete' => 1, |
|
182 'action' => 'delete-selected', |
|
183 'checked' => $_REQUEST['checked'], |
|
184 '_wpnonce' => $_REQUEST['_wpnonce'] |
|
185 ), network_admin_url( 'themes.php' ) ) ) ); |
|
186 } |
|
187 |
186 $paged = ( $_REQUEST['paged'] ) ? $_REQUEST['paged'] : 1; |
188 $paged = ( $_REQUEST['paged'] ) ? $_REQUEST['paged'] : 1; |
187 wp_redirect( network_admin_url( "themes.php?deleted=".count( $themes )."&paged=$paged&s=$s" ) ); |
189 wp_redirect( add_query_arg( array( |
|
190 'deleted' => count( $themes ), |
|
191 'paged' => $paged, |
|
192 's' => $s |
|
193 ), network_admin_url( 'themes.php' ) ) ); |
188 exit; |
194 exit; |
189 break; |
195 break; |
190 } |
196 } |
191 } |
197 } |
192 |
198 |