X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/e9d988989fe37ab8c5f903e47fbe36e6e00dc51f..5aa86a9053fb0fa15846bb60aac2fb8fdfff524a:/wp-admin/includes/class-wp-plugins-list-table.php diff --git a/wp-admin/includes/class-wp-plugins-list-table.php b/wp-admin/includes/class-wp-plugins-list-table.php index b5ad6d48..577750c9 100644 --- a/wp-admin/includes/class-wp-plugins-list-table.php +++ b/wp-admin/includes/class-wp-plugins-list-table.php @@ -9,25 +9,23 @@ */ class WP_Plugins_List_Table extends WP_List_Table { - function WP_Plugins_List_Table() { + function __construct() { global $status, $page; - $default_status = get_user_option( 'plugins_last_view' ); - if ( empty( $default_status ) ) - $default_status = 'all'; - $status = isset( $_REQUEST['plugin_status'] ) ? $_REQUEST['plugin_status'] : $default_status; - if ( !in_array( $status, array( 'all', 'active', 'inactive', 'recently_activated', 'upgrade', 'network', 'mustuse', 'dropins', 'search' ) ) ) - $status = 'all'; - if ( $status != $default_status && 'search' != $status ) - update_user_meta( get_current_user_id(), 'plugins_last_view', $status ); + $status = 'all'; + if ( isset( $_REQUEST['plugin_status'] ) && in_array( $_REQUEST['plugin_status'], array( 'active', 'inactive', 'recently_activated', 'upgrade', 'network', 'mustuse', 'dropins', 'search' ) ) ) + $status = $_REQUEST['plugin_status']; + + if ( isset($_REQUEST['s']) ) + $_SERVER['REQUEST_URI'] = add_query_arg('s', stripslashes($_REQUEST['s']) ); $page = $this->get_pagenum(); - parent::WP_List_Table( array( + parent::__construct( array( 'plural' => 'plugins', ) ); } - + function get_table_classes() { return array( 'widefat', $this->_args['plural'] ); } @@ -132,7 +130,7 @@ class WP_Plugins_List_Table extends WP_List_Table { uasort( $this->items, array( &$this, '_order_callback' ) ); } - $plugins_per_page = $this->get_items_per_page( str_replace( '-', '_', $screen->id . '_per_page' ) ); + $plugins_per_page = $this->get_items_per_page( str_replace( '-', '_', $screen->id . '_per_page' ), 999 ); $start = ( $page - 1 ) * $plugins_per_page; @@ -287,9 +285,9 @@ class WP_Plugins_List_Table extends WP_List_Table { if ( 'recently_activated' == $status ) submit_button( __( 'Clear List' ), 'secondary', 'clear-recent-list', false ); elseif ( 'top' == $which && 'mustuse' == $status ) - echo '

' . __( 'Files in the /wp-content/mu-plugins directory are executed automatically.' ) . '

'; + echo '

' . sprintf( __( 'Files in the %s directory are executed automatically.' ), str_replace( ABSPATH, '/', WPMU_PLUGIN_DIR ) ) . '

'; elseif ( 'top' == $which && 'dropins' == $status ) - echo '

' . __( 'Drop-ins are advanced plugins in the /wp-content directory that replace WordPress functionality when present.' ) . '

'; + echo '

' . sprintf( __( 'Drop-ins are advanced plugins in the %s directory that replace WordPress functionality when present.' ), str_replace( ABSPATH, '', WP_CONTENT_DIR ) ) . '

'; echo ''; }