### Eclipse Workspace Patch 1.0
#P wordpress
|
|
|
166 | 166 | wp_die(__('You do not have sufficient permissions to deactivate plugins for this site.')); |
167 | 167 | |
168 | 168 | check_admin_referer('deactivate-plugin_' . $plugin); |
| 169 | $redirect_url = "plugins.php?deactivate=true&plugin_status={$status}&paged={$page}"; |
| 170 | $header_sent = headers_sent(); |
| 171 | !$header_sent && wp_redirect( $redirect_url ); // output for later |
169 | 172 | deactivate_plugins($plugin); |
170 | | update_option('recently_activated', array($plugin => time()) + (array)get_option('recently_activated')); |
171 | | if (headers_sent()) |
172 | | echo "<meta http-equiv='refresh' content='" . esc_attr( "0;url=plugins.php?deactivate=true&plugin_status=$status&paged=$page" ) . "' />"; |
173 | | else |
174 | | wp_redirect("plugins.php?deactivate=true&plugin_status=$status&paged=$page"); |
| 173 | update_option( 'recently_activated', array( $plugin => time() ) + (array) get_option( 'recently_activated' ) ); |
| 174 | $header_sent && printf( '<meta http-equiv="refresh" content="0;url=%s" />', esc_attr( $redirect_url ) ); |
175 | 175 | exit; |
176 | 176 | break; |
177 | 177 | case 'deactivate-selected': |