Changeset 8218
- Timestamp:
- 06/30/2008 11:12:18 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/plugins.php
r8095 r8218 3 3 4 4 $action = ''; 5 foreach( array('activate-selected', 'deactivate-selected', 'delete-selected' ) as $action_key ) {5 foreach( array('activate-selected', 'deactivate-selected', 'delete-selected', 'clear-recent-list') as $action_key ) { 6 6 if( isset($_POST[$action_key]) ) { 7 7 $action = $action_key; … … 150 150 require_once('admin-footer.php'); 151 151 exit; 152 } 152 } //Endif verify-delete 153 153 $delete_result = delete_plugins($plugins); 154 154 155 155 wp_cache_delete('plugins', 'plugins'); 156 156 break; 157 case 'clear-recent-list': 158 update_option('recently_activated', array()); 157 159 break; 158 160 } … … 198 200 <?php 199 201 202 $all_plugins = get_plugins(); 200 203 $active_plugins = array(); 201 $ available_plugins = array();204 $inactive_plugins = array(); 202 205 $recent_plugins = array(); 203 206 $recently_activated = (array)get_option('recently_activated'); … … 209 212 if( $recently_activated != get_option('recently_activated') ) //If array changed, update it. 210 213 update_option('recently_activated', $recently_activated); 211 212 $all_plugins = get_plugins();213 214 214 215 $plugins_allowedtags = array('a' => array('href' => array(),'title' => array()),'abbr' => array('title' => array()),'acronym' => array('title' => array()),'code' => array(),'em' => array(),'strong' => array()); … … 224 225 $plugin_data['Description'] .= ' <cite>' . sprintf( __('By %s'), $plugin_data['Author'] ) . '.</cite>'; 225 226 227 //Filter into individual sections 226 228 if ( is_plugin_active($plugin_file) ) { 227 229 $active_plugins[ $plugin_file ] = $plugin_data; … … 230 232 $recent_plugins[ $plugin_file ] = $plugin_data; 231 233 else 232 $ available_plugins[ $plugin_file ] = $plugin_data;234 $inactive_plugins[ $plugin_file ] = $plugin_data; 233 235 } 234 236 } … … 290 292 ?> 291 293 294 <?php if ( ! empty($active_plugins) ) : ?> 292 295 <h3 id="currently-active"><?php _e('Currently Active Plugins') ?></h3> 293 296 <form method="post" action="<?php echo admin_url('plugins.php') ?>"> … … 304 307 305 308 <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.'), WP_PLUGIN_DIR); ?></p> 309 <?php endif; ?> 306 310 307 311 <?php if ( ! empty($recent_plugins) ) : ?> 308 312 <h3 id="recent-plugins"><?php _e('Recently Active Plugins') ?></h3> 313 <p><?php _e('The following plugins were recently active. When a plugin has been inactive for more than 7 days it will be moved to the Inactive plugin list.') ?></p> 309 314 <form method="post" action="<?php echo admin_url('plugins.php') ?>"> 310 315 <?php wp_nonce_field('bulk-manage-plugins') ?> … … 316 321 <input type="submit" name="delete-selected" value="<?php _e('Delete') ?>" class="button-secondary" /> 317 322 <?php endif; ?> 323 <input type="submit" name="clear-recent-list" value="<?php _e('Clear List') ?>" class="button-secondary" /> 318 324 </div> 319 325 </div> … … 323 329 <?php endif; ?> 324 330 325 <h3 id="available-plugins"><?php _e('Available Plugins') ?></h3> 331 <?php if ( ! empty($inactive_plugins) ) : ?> 332 <h3 id="inactive-plugins"><?php _e('Inactive Plugins') ?></h3> 326 333 <form method="post" action="<?php echo admin_url('plugins.php') ?>"> 327 334 <?php wp_nonce_field('bulk-manage-plugins') ?> 328 335 329 <?php if ( ! empty($available_plugins) ) : ?>330 336 <div class="tablenav"> 331 337 <div class="alignleft"> … … 337 343 </div> 338 344 <br class="clear" /> 339 <?php print_plugins_table($ available_plugins, 'available') ?>345 <?php print_plugins_table($inactive_plugins, 'inactive') ?> 340 346 </form> 347 <?php endif; ?> 348 349 <?php if ( empty($all_plugins) ) : ?> 350 <p><?php _e('You do not appear to have any plugins available at this time.') ?></p> 341 351 <?php endif; ?> 342 352
Note: See TracChangeset
for help on using the changeset viewer.