Ticket #7091: 7091.3.diff
File 7091.3.diff, 3.6 KB (added by , 17 years ago) |
---|
-
wp-admin/plugins.php
197 197 <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> 198 198 <?php 199 199 200 $all_plugins = get_plugins(); 200 201 $active_plugins = array(); 201 $ available_plugins = array();202 $inactive_plugins = array(); 202 203 $recent_plugins = array(); 203 204 $recently_activated = (array)get_option('recently_activated'); 204 205 … … 209 210 if( $recently_activated != get_option('recently_activated') ) //If array changed, update it. 210 211 update_option('recently_activated', $recently_activated); 211 212 212 $all_plugins = get_plugins();213 214 213 $plugins_allowedtags = array('a' => array('href' => array(),'title' => array()),'abbr' => array('title' => array()),'acronym' => array('title' => array()),'code' => array(),'em' => array(),'strong' => array()); 215 214 216 215 foreach( (array)$all_plugins as $plugin_file => $plugin_data) { … … 223 222 if( ! empty($plugin_data['Author']) ) 224 223 $plugin_data['Description'] .= ' <cite>' . sprintf( __('By %s'), $plugin_data['Author'] ) . '.</cite>'; 225 224 225 //Filter into individual sections 226 226 if ( is_plugin_active($plugin_file) ) { 227 227 $active_plugins[ $plugin_file ] = $plugin_data; 228 228 } else { 229 229 if ( isset( $recently_activated[ $plugin_file ] ) ) //Was the plugin recently activated? 230 230 $recent_plugins[ $plugin_file ] = $plugin_data; 231 231 else 232 $ available_plugins[ $plugin_file ] = $plugin_data;232 $inactive_plugins[ $plugin_file ] = $plugin_data; 233 233 } 234 234 } 235 235 … … 289 289 } //End print_plugins_table() 290 290 ?> 291 291 292 <?php if ( ! empty($active_plugins) ) : ?> 292 293 <h3 id="currently-active"><?php _e('Currently Active Plugins') ?></h3> 293 294 <form method="post" action="<?php echo admin_url('plugins.php') ?>"> 294 295 <?php wp_nonce_field('bulk-manage-plugins') ?> … … 303 304 </form> 304 305 305 306 <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> 307 <?php endif; ?> 306 308 307 309 <?php if ( ! empty($recent_plugins) ) : ?> 308 310 <h3 id="recent-plugins"><?php _e('Recently Active Plugins') ?></h3> … … 322 324 </form> 323 325 <?php endif; ?> 324 326 325 <h3 id="available-plugins"><?php _e('Available Plugins') ?></h3> 327 <?php if ( ! empty($inactive_plugins) ) : ?> 328 <h3 id="inactive-plugins"><?php _e('Inactive Plugins') ?></h3> 326 329 <form method="post" action="<?php echo admin_url('plugins.php') ?>"> 327 330 <?php wp_nonce_field('bulk-manage-plugins') ?> 328 331 329 <?php if ( ! empty($available_plugins) ) : ?>330 332 <div class="tablenav"> 331 333 <div class="alignleft"> 332 334 <input type="submit" name="activate-selected" value="<?php _e('Activate') ?>" class="button-secondary" /> … … 336 338 </div> 337 339 </div> 338 340 <br class="clear" /> 339 <?php print_plugins_table($ available_plugins, 'available') ?>341 <?php print_plugins_table($inactive_plugins, 'inactive') ?> 340 342 </form> 341 343 <?php endif; ?> 342 344 345 <?php if ( empty($all_plugins) ) : ?> 346 <p><?php _e('You do not appear to have any plugins available at this time.') ?></p> 347 <?php endif; ?> 348 343 349 <h2><?php _e('Get More Plugins'); ?></h2> 344 350 <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> 345 351 <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.'), WP_PLUGIN_DIR); ?></p>