Add per page screen option to plugins page. see #9527

git-svn-id: https://develop.svn.wordpress.org/trunk@11027 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2009-04-21 06:49:53 +00:00
parent 3ff9ca71db
commit 493a97c532
3 changed files with 24 additions and 6 deletions
+7 -2
View File
@@ -206,7 +206,9 @@ if ( !empty($invalid) )
<div class="wrap">
<?php screen_icon(); ?>
<h2><?php echo wp_specialchars( $title ); ?></h2>
<h2><?php echo wp_specialchars( $title ); ?></h2>
<p><?php _e('Plugins extend and expand the functionality of WordPress. Install new plugins and then activate, deactivate, or delete them here.'); ?></p>
<?php
@@ -284,7 +286,10 @@ $plugins = &$$plugin_array_name;
$page = isset($_GET['paged']) ? $_GET['paged'] : 1;
$total_this_page = "total_{$status}_plugins";
$total_this_page = $$total_this_page;
$plugins_per_page = apply_filters('plugins_per_page', 20, $status);
$plugins_per_page = get_user_option('plugins_per_page');
if ( empty($plugins_per_page) )
$plugins_per_page = 20;
$plugins_per_page = apply_filters('plugins_per_page', $plugins_per_page);
$start = ($page - 1) * $plugins_per_page;