WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/05/2010 09:26:27 PM (11 years ago)
Author:
scribu
Message:

introduce WP_List_Table::views(). See #14579

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/plugins.php

    r15528 r15578  
    368368<?php do_action( 'pre_current_active_plugins', $plugins['all'] ) ?>
    369369
     370<?php $wp_list_table->views(); ?>
     371
    370372<form method="post" action="">
    371373<input type="hidden" name="plugin_status" value="<?php echo esc_attr($status) ?>" />
    372374<input type="hidden" name="paged" value="<?php echo esc_attr($page) ?>" />
    373 
    374 <ul class="subsubsub">
    375 <?php
    376 
    377 $status_links = array();
    378 foreach ( $totals as $type => $count ) {
    379     if ( !$count )
    380         continue;
    381 
    382     switch ( $type ) {
    383         case 'all':
    384             $text = _nx( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $count, 'plugins' );
    385             break;
    386         case 'active':
    387             $text = _n( 'Active <span class="count">(%s)</span>', 'Active <span class="count">(%s)</span>', $count );
    388             break;
    389         case 'recently_activated':
    390             $text = _n( 'Recently Active <span class="count">(%s)</span>', 'Recently Active <span class="count">(%s)</span>', $count );
    391             break;
    392         case 'inactive':
    393             $text = _n( 'Inactive <span class="count">(%s)</span>', 'Inactive <span class="count">(%s)</span>', $count );
    394             break;
    395         case 'network':
    396             $text = _n( 'Network <span class="count">(%s)</span>', 'Network <span class="count">(%s)</span>', $count );
    397             break;
    398         case 'mustuse':
    399             $text = _n( 'Must-Use <span class="count">(%s)</span>', 'Must-Use <span class="count">(%s)</span>', $count );
    400             break;
    401         case 'dropins':
    402             $text = _n( 'Drop-ins <span class="count">(%s)</span>', 'Drop-ins <span class="count">(%s)</span>', $count );
    403             break;
    404         case 'upgrade':
    405             $text = _n( 'Upgrade Available <span class="count">(%s)</span>', 'Upgrade Available <span class="count">(%s)</span>', $count );
    406             break;
    407         case 'search':
    408             $text = _n( 'Search Results <span class="count">(%s)</span>', 'Search Results <span class="count">(%s)</span>', $count );
    409             break;
    410     }
    411 
    412     $status_links[] = sprintf( "<li><a href='%s' %s>%s</a>",
    413         add_query_arg('plugin_status', $type, 'plugins.php'),
    414         ( $type == $status ) ? ' class="current"' : '',
    415         sprintf( $text, number_format_i18n( $count ) )
    416     );
    417 }
    418 echo implode( " |</li>\n", $status_links ) . '</li>';
    419 unset( $status_links );
    420 ?>
    421 </ul>
    422375
    423376<?php
Note: See TracChangeset for help on using the changeset viewer.