Ticket #3498: wp_plugins_deactivate_all.diff
| File wp_plugins_deactivate_all.diff, 2.2 kB (added by charleshooper, 2 years ago) |
|---|
-
wp-admin/plugins.php
old new 25 25 update_option('active_plugins', $current); 26 26 do_action('deactivate_' . trim( $_GET['plugin'] )); 27 27 wp_redirect('plugins.php?deactivate=true'); 28 } else if ( 'deactivate-all' == $_GET['action'] ) { 29 check_admin_referer('deactivate-all'); 30 $current = get_option('active_plugins'); 31 32 foreach ( $current as $plugin ) { 33 array_splice($current, array_search( $plugin, $current), 1 ); 34 do_action('deactivate_' . $plugin); 35 } 36 update_option('active_plugins', $current); 37 wp_redirect('plugins.php?deactivate-all=true'); 28 38 } 29 39 exit; 30 40 } … … 66 76 <div id="message" class="updated fade"><p><?php _e('Plugin <strong>deactivated</strong>.') ?></p> 67 77 </div> 68 78 <?php endif; ?> 69 79 <?php if (isset($_GET['deactivate-all'])) : ?> 80 <div id="message" class="updated fade"><p><?php _e('All plugins <strong>deactivated</strong>.') ?></p> 81 </div> 82 <?php endif; ?> 70 83 <div class="wrap"> 71 84 <h2><?php _e('Plugin Management'); ?></h2> 72 85 <p><?php _e('Plugins extend and expand the functionality of WordPress. Once a plugin is installed, you may activate it or deactivate it here.'); ?></p> … … 140 153 } 141 154 ?> 142 155 143 <p><?php printf(__('If something goes wrong with a plugin and you can’t use WordPress, delete or rename that file in the <code>%s</code> directory and it will be automatically deactivated. '), PLUGINDIR); ?></p>156 <p><?php printf(__('If something goes wrong with a plugin and you can’t use WordPress, delete or rename that file in the <code>%s</code> directory and it will be automatically deactivated. Alternatively, you can also <a href="%s">deactivate all plugins</a>!'), PLUGINDIR, wp_nonce_url('plugins.php?action=deactivate-all')); ?></p> 144 157 158 145 159 <h2><?php _e('Get More Plugins'); ?></h2> 146 160 <p><?php _e('You can find additional plugins for your site in the <a href="http://wordpress.org/extend/plugins/">WordPress plugin directory</a>.'); ?></p> 147 161 <p><?php printf(__('To install a plugin you generally just need to upload the plugin file into your <code>%s</code> directory. Once a plugin is uploaded, you may activate it here.'), PLUGINDIR); ?></p>
