From c11e87fbb8f5dcee3ff79de635a7bb39bd2e2608 Mon Sep 17 00:00:00 2001 From: audrasjb Date: Tue, 27 Jun 2023 16:01:27 +0000 Subject: [PATCH] Plugins: Introduce the `plugins_list` filter. This changeset adds the `plugins_list` hook, which can be use to filter the list of plugin displayed on WP Admin Plugins screen. Props nateallen, fischfood, mukesh27, peterwilsoncc, SergeyBiryukov, audrasjb, costdev, ecorica, zunaid321. Fixes #57278. Built from https://develop.svn.wordpress.org/trunk@56068 git-svn-id: http://core.svn.wordpress.org/trunk@55580 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-plugins-list-table.php | 9 +++++++++ wp-includes/version.php | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/wp-admin/includes/class-wp-plugins-list-table.php b/wp-admin/includes/class-wp-plugins-list-table.php index 81e45cf258..b58ba5f352 100644 --- a/wp-admin/includes/class-wp-plugins-list-table.php +++ b/wp-admin/includes/class-wp-plugins-list-table.php @@ -296,6 +296,15 @@ class WP_Plugins_List_Table extends WP_List_Table { $plugins['search'] = array_filter( $plugins['all'], array( $this, '_search_callback' ) ); } + /** + * Filters the array of plugins for the list table. + * + * @since 6.3.0 + * + * @param array[] $plugins An array of arrays of plugin data, keyed by context. + */ + $plugins = apply_filters( 'plugins_list', $plugins ); + $totals = array(); foreach ( $plugins as $type => $list ) { $totals[ $type ] = count( $list ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 1e4f7bf19b..c0e1e28d52 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.3-alpha-56067'; +$wp_version = '6.3-alpha-56068'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.