* Allow Pagination for Must-Use/Dropin plugins

* Respect WP_CONTENT_DIR & WPMU_PLUGIN_DIR for help text
 * Move help text into WP_Plugins_List_Table
See #17327

git-svn-id: https://develop.svn.wordpress.org/trunk@17806 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse 2011-05-05 05:24:15 +00:00
parent 9548ad32ce
commit 0822d55016
2 changed files with 13 additions and 19 deletions

View File

@ -195,13 +195,6 @@ class WP_Plugins_List_Table extends WP_List_Table {
return array();
}
function display_tablenav( $which ) {
global $status;
if ( !in_array( $status, array( 'mustuse', 'dropins' ) ) )
parent::display_tablenav( $which );
}
function get_views() {
global $totals, $status;
@ -286,11 +279,19 @@ class WP_Plugins_List_Table extends WP_List_Table {
function extra_tablenav( $which ) {
global $status;
if ( 'recently_activated' == $status ) { ?>
<div class="alignleft actions">
<?php submit_button( __( 'Clear List' ), 'secondary', 'clear-recent-list', false ); ?>
</div>
<?php }
if ( ! in_array($status, array('recently_activated', 'mustuse', 'dropins') ) )
return;
echo '<div class="alignleft actions">';
if ( 'recently_activated' == $status )
submit_button( __( 'Clear List' ), 'secondary', 'clear-recent-list', false );
elseif ( 'top' == $which && 'mustuse' == $status )
echo '<p>' . sprintf( __( 'Files in the <code>%s</code> directory are executed automatically.' ), str_replace( ABSPATH, '/', WPMU_PLUGIN_DIR ) ) . '</p>';
elseif ( 'top' == $which && 'dropins' == $status )
echo '<p>' . sprintf( __( 'Drop-ins are advanced plugins in the <code>%s</code> directory that replace WordPress functionality when present.' ), str_replace( ABSPATH, '', WP_CONTENT_DIR ) ) . '</p>';
echo '</div>';
}
function current_action() {

View File

@ -405,13 +405,6 @@ if ( $s )
<input type="hidden" name="plugin_status" value="<?php echo esc_attr($status) ?>" />
<input type="hidden" name="paged" value="<?php echo esc_attr($page) ?>" />
<?php
if ( 'mustuse' == $status )
echo '<br class="clear" /><p>' . __( 'Files in the <code>/wp-content/mu-plugins</code> directory are executed automatically.' ) . '</p>';
elseif ( 'dropins' == $status )
echo '<br class="clear" /><p>' . __( 'Drop-ins are advanced plugins in the <code>/wp-content</code> directory that replace WordPress functionality when present.' ) . '</p>';
?>
<?php $wp_list_table->display(); ?>
</form>