From 1178047725863c8f0caf96faa66b7d29633ab849 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Thu, 3 Mar 2016 09:50:57 +0000 Subject: [PATCH] Docs: Move the hook doc for the `all_plugins` filter in `WP_Plugins_List_Table::prepare_items()` to directly precede the `apply_filters()` line. See #35986. git-svn-id: https://develop.svn.wordpress.org/trunk@36828 602fd350-edb4-49c9-b593-d223f7449a82 --- .../includes/class-wp-plugins-list-table.php | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/wp-admin/includes/class-wp-plugins-list-table.php b/src/wp-admin/includes/class-wp-plugins-list-table.php index b84ebd18c4..772c8c262a 100644 --- a/src/wp-admin/includes/class-wp-plugins-list-table.php +++ b/src/wp-admin/includes/class-wp-plugins-list-table.php @@ -78,23 +78,25 @@ class WP_Plugins_List_Table extends WP_List_Table { wp_reset_vars( array( 'orderby', 'order' ) ); /** - * Filter the full array of plugins to list in the Plugins list table. + * Filters the full array of plugins to list in the Plugins list table. * * @since 3.0.0 * * @see get_plugins() * - * @param array $plugins An array of plugins to display in the list table. + * @param array $all_plugins An array of plugins to display in the list table. */ + $all_plugins = apply_filters( 'all_plugins', get_plugins() ); + $plugins = array( - 'all' => apply_filters( 'all_plugins', get_plugins() ), - 'search' => array(), - 'active' => array(), - 'inactive' => array(), + 'all' => $all_plugins, + 'search' => array(), + 'active' => array(), + 'inactive' => array(), 'recently_activated' => array(), - 'upgrade' => array(), - 'mustuse' => array(), - 'dropins' => array() + 'upgrade' => array(), + 'mustuse' => array(), + 'dropins' => array(), ); $screen = $this->screen;