Changeset 10999
- Timestamp:
- 04/19/2009 01:11:13 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/plugins.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/plugins.php
r10978 r10999 165 165 add_thickbox(); 166 166 167 $help = '<p>' . sprintf(__('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>'; 168 $help .= '<p>' . sprintf(__('You can find additional plugins for your site by using the new <a href="%1$s">Plugin Browser/Installer</a> functionality or by browsing the <a href="http://wordpress.org/extend/plugins/">WordPress Plugin Directory</a> directly and installing manually. To <em>manually</em> install a plugin you generally just need to upload the plugin file into your <code>%2$s</code> directory. Once a plugin has been installed, you may activate it here.'), 'plugin-install.php', WP_PLUGIN_DIR) . '</p>'; 169 170 add_contextual_help('plugins', $help); 171 167 172 $title = __('Manage Plugins'); 168 173 require_once('admin-header.php'); … … 229 234 $active_plugins[ $plugin_file ] = $plugin_data; 230 235 } else { 231 if ( isset( $recently_activated[ $plugin_file ] ) ) // Was the plugin recently activated?236 if ( isset( $recently_activated[ $plugin_file ] ) ) // Was the plugin recently activated? 232 237 $recent_plugins[ $plugin_file ] = $plugin_data; 233 else 234 $inactive_plugins[ $plugin_file ] = $plugin_data; 238 $inactive_plugins[ $plugin_file ] = $plugin_data; 235 239 } 236 240 } 237 241 238 ?> 239 240 <?php 242 $total_plugins = count($all_plugins); 243 $total_inactive_plugins = count($inactive_plugins); 244 $total_active_plugins = count($active_plugins); 245 $total_recent_plugins = count($recent_plugins); 246 247 $status = ( isset($_GET['plugin_status']) ) ? $_GET['plugin_status'] : 'all'; 248 if ( !in_array($status, array('all', 'active', 'inactive', 'recent')) ) 249 $status = 'all'; 250 $plugin_array_name = "${status}_plugins"; 251 $plugins = &$$plugin_array_name; 252 241 253 /** 242 254 * @ignore … … 288 300 $actions = apply_filters( "plugin_action_links_$plugin_file", $actions, $plugin_file, $plugin_data, $context ); 289 301 $action_count = count($actions); 290 302 $class = is_plugin_active($plugin_file) ? 'active' : 'inactive'; 291 303 echo " 292 <tr class='$c ontext'>304 <tr class='$class'> 293 305 <th scope='row' class='check-column'><input type='checkbox' name='checked[]' value='" . attribute_escape($plugin_file) . "' /></th> 294 306 <td class='plugin-title'><strong>{$plugin_data['Title']}</strong>"; … … 344 356 ?> 345 357 346 <?php if ( ! empty($active_plugins) ) : ?>347 <h3 id="currently-active"><?php _e('Currently Active Plugins') ?></h3>348 358 <form method="post" action="<?php echo admin_url('plugins.php') ?>"> 349 359 <?php wp_nonce_field('bulk-manage-plugins') ?> 350 360 361 <ul class="subsubsub"> 362 <?php 363 $status_links = array(); 364 $class = ( 'all' == $status ) ? ' class="current"' : ''; 365 $status_links[] = "<li><a href='plugins.php' $class>" . sprintf( _n( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $total_plugins ), number_format_i18n( $total_plugins ) ) . '</a>'; 366 if ( ! empty($active_plugins) ) { 367 $class = ( 'active' == $status ) ? ' class="current"' : ''; 368 $status_links[] = "<li><a href='plugins.php?plugin_status=active' $class>" . sprintf( _n( 'Active <span class="count">(%s)</span>', 'Active <span class="count">(%s)</span>', $total_active_plugins ), number_format_i18n( $total_active_plugins ) ) . '</a>'; 369 } 370 if ( ! empty($recent_plugins) ) { 371 $class = ( 'recent' == $status ) ? ' class="current"' : ''; 372 $status_links[] = "<li><a href='plugins.php?plugin_status=recent' $class>" . sprintf( _n( 'Recently Active <span class="count">(%s)</span>', 'Recently Active <span class="count">(%s)</span>', $total_recent_plugins ), number_format_i18n( $total_recent_plugins ) ) . '</a>'; 373 } 374 if ( ! empty($inactive_plugins) ) { 375 $class = ( 'inactive' == $status ) ? ' class="current"' : ''; 376 $status_links[] = "<li><a href='plugins.php?plugin_status=inactive' $class>" . sprintf( _n( 'Inactive <span class="count">(%s)</span>', 'Inactive <span class="count">(%s)</span>', $total_inactive_plugins ), number_format_i18n( $total_inactive_plugins ) ) . '</a>'; 377 } 378 echo implode( " |</li>\n", $status_links ) . '</li>'; 379 unset( $status_links ); 380 ?> 381 </ul> 382 351 383 <div class="tablenav"> 352 <?php print_plugin_actions( 'active') ?>384 <?php print_plugin_actions($status) ?> 353 385 </div> 354 386 <div class="clear"></div> 355 <?php print_plugins_table($ active_plugins, 'active') ?>387 <?php print_plugins_table($plugins, $status) ?> 356 388 </form> 357 358 <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>359 <?php endif; ?>360 361 <?php if ( ! empty($recent_plugins) ) : ?>362 <h3 id="recent-plugins"><?php _e('Recently Active Plugins') ?></h3>363 <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>364 <form method="post" action="<?php echo admin_url('plugins.php') ?>">365 <?php wp_nonce_field('bulk-manage-plugins') ?>366 367 <div class="tablenav">368 <?php print_plugin_actions('recent') ?>369 </div>370 <div class="clear"></div>371 <?php print_plugins_table($recent_plugins, 'recent') ?>372 </form>373 <?php endif; ?>374 375 <?php if ( ! empty($inactive_plugins) ) : ?>376 <h3 id="inactive-plugins"><?php _e('Inactive Plugins') ?></h3>377 <form method="post" action="<?php echo admin_url('plugins.php') ?>">378 <?php wp_nonce_field('bulk-manage-plugins') ?>379 380 <div class="tablenav">381 <?php print_plugin_actions('inactive') ?>382 </div>383 <div class="clear"></div>384 <?php print_plugins_table($inactive_plugins, 'inactive') ?>385 </form>386 <?php endif; ?>387 389 388 390 <?php if ( empty($all_plugins) ) : ?> … … 390 392 <?php endif; ?> 391 393 392 <h2><?php _e('Get More Plugins'); ?></h2>393 <p><?php _e('You can find additional plugins for your site by using the new <a href="plugin-install.php">Plugin Browser/Installer</a> functionality, Or by browsing the <a href="http://wordpress.org/extend/plugins/">WordPress Plugin Directory</a> directly and installing manually.'); ?></p>394 <p><?php printf(__('To <em>manually</em> install a plugin you generally just need to upload the plugin file into your <code>%s</code> directory.'), WP_PLUGIN_DIR); ?></p>395 <p><?php _e('Once a plugin has been installed, you may activate it here.'); ?></p>396 397 394 </div> 398 395
Note: See TracChangeset
for help on using the changeset viewer.