Changeset 5156 for trunk/wp-admin/plugins.php
- Timestamp:
- 03/31/2007 08:56:54 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/plugins.php
r4972 r5156 27 27 do_action('deactivate_' . trim( $_GET['plugin'] )); 28 28 wp_redirect('plugins.php?deactivate=true'); 29 } elseif ($_GET['action'] == 'deactivate-all') { 30 check_admin_referer('deactivate-all'); 31 $current = get_option('active_plugins'); 32 33 foreach ($current as $plugin) { 34 array_splice($current, array_search($plugin, $current), 1); 35 do_action('deactivate_' . $plugin); 36 } 37 38 update_option('active_plugins', array()); 39 wp_redirect('plugins.php?deactivate-all=true'); 29 40 } 30 41 exit; … … 66 77 <?php elseif ( isset($_GET['deactivate']) ) : ?> 67 78 <div id="message" class="updated fade"><p><?php _e('Plugin <strong>deactivated</strong>.') ?></p></div> 79 <?php elseif (isset($_GET['deactivate-all'])) : ?> 80 <div id="message" class="updated fade"><p><?php _e('All plugins <strong>deactivated</strong>.'); ?></p></div> 68 81 <?php endif; ?> 69 82 … … 136 149 ?> 137 150 151 <tr> 152 <td colspan="5"><a href="<?php echo wp_nonce_url('plugins.php?action=deactivate-all', 'deactivate-all'); ?>"><?php _e('Deactivate All Plugins'); ?></a></td> 153 </tr> 154 138 155 </table> 139 156 <?php
Note: See TracChangeset
for help on using the changeset viewer.