Changeset 17237
- Timestamp:
- 01/07/2011 07:01:34 PM (14 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/theme.php
r16734 r17237 44 44 * 45 45 * @param string $template Template directory of the theme to delete 46 * @param string $redirect Redirect to page when complete. 46 47 * @return mixed 47 48 */ 48 function delete_theme($template ) {49 function delete_theme($template, $redirect = '') { 49 50 global $wp_filesystem; 50 51 … … 53 54 54 55 ob_start(); 55 $url = wp_nonce_url('themes.php?action=delete&template=' . $template, 'delete-theme_' . $template); 56 if ( false === ($credentials = request_filesystem_credentials($url)) ) { 56 if ( empty( $redirect ) ) 57 $redirect = wp_nonce_url('themes.php?action=delete&template=' . $template, 'delete-theme_' . $template); 58 if ( false === ($credentials = request_filesystem_credentials($redirect)) ) { 57 59 $data = ob_get_contents(); 58 60 ob_end_clean(); -
trunk/wp-admin/network/themes.php
r17233 r17237 161 161 162 162 foreach ( $themes as $theme ) 163 $delete_result = delete_theme( $theme );163 $delete_result = delete_theme( $theme, esc_url( add_query_arg( array('verify-delete' => 1), $_SERVER['REQUEST_URI'] ) ) ); 164 164 wp_redirect( add_query_arg( 'deleted', count( $themes ), $referer ) ); 165 165 exit;
Note: See TracChangeset
for help on using the changeset viewer.