Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/wp-admin/includes/admin-filters.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@
add_action( 'install_plugins_new', 'display_plugins_table' );
add_action( 'install_plugins_beta', 'display_plugins_table' );
add_action( 'install_plugins_favorites', 'display_plugins_table' );
add_action( 'install_plugins_multisite', 'display_plugins_table' );
add_action( 'install_plugins_pre_plugin-information', 'install_plugin_information' );

// Template hooks.
Expand Down
12 changes: 11 additions & 1 deletion src/wp-admin/includes/class-wp-plugin-install-list-table.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ public function prepare_items() {
$tabs['recommended'] = _x( 'Recommended', 'Plugin Installer' );
$tabs['favorites'] = _x( 'Favorites', 'Plugin Installer' );

if ( is_multisite() ) {
$tabs['multisite'] = _x( 'Multisite', 'Plugin Installer' );
}

if ( current_user_can( 'upload_plugins' ) ) {
/*
* No longer a real tab. Here for filter compatibility.
Expand All @@ -129,7 +133,7 @@ public function prepare_items() {
* @since 2.7.0
*
* @param string[] $tabs The tabs shown on the Add Plugins screen. Defaults include
* 'featured', 'popular', 'recommended', 'favorites', and 'upload'.
* 'featured', 'popular', 'recommended', 'favorites', and 'upload' and 'multisite' (network only).
*/
$tabs = apply_filters( 'install_plugins_tabs', $tabs );

Expand Down Expand Up @@ -208,6 +212,10 @@ public function prepare_items() {
add_action( 'install_plugins_favorites', 'install_plugins_favorites_form', 9, 0 );
break;

case 'multisite':
$args['tag'] = 'multisite';
break;

default:
$args = false;
break;
Expand All @@ -227,8 +235,10 @@ public function prepare_items() {
* - `install_plugins_table_api_args_upload`
* - `install_plugins_table_api_args_search`
* - `install_plugins_table_api_args_beta`
* - `install_plugins_table_api_args_multisite`
*
* @since 3.7.0
* @since 7.1.0 Added multisite filter
*
* @param array|false $args Plugin install API arguments.
*/
Expand Down
3 changes: 3 additions & 0 deletions src/wp-admin/includes/plugin-install.php
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,9 @@ function display_plugins_table() {
return;
}
break;
case 'install_plugins_multisite':
echo '<p>' . __( 'These are all plugins tagged with <code>multisite</code> from their author, this does not necessarily mean that they are optimized for multisite.' ) . '</p>';

@apermo apermo Jun 21, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you opt to go with the "..., this does not necessarily mean that they are optimized for multisite."
That is kind of implied by "Tagged from their author" and adds furhter complexity when reading. I understand that you want to emphasize that it is no guarantee, but I think keeping it simple wins here.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a suggestion from @desrosj to emphasize that this does not mean it is in any way tested. The author can add this tag for any reason.

break;
}
?>
<form id="plugin-filter" method="post">
Expand Down
Loading