Make WordPress Core

Changeset 62448


Ignore:
Timestamp:
06/02/2026 01:58:44 PM (2 months ago)
Author:
westonruter
Message:

Plugins: Hide the search form on the Favorites tab.

The plugin search form does not apply to the Favorites tab, which instead expects a WordPress.org username to look up a user's favorited plugins. Rendering the term-based search form there was misleading. Update WP_Plugin_Install_List_Table::views() to read the global $tab and skip install_search_form() when the favorites tab is active, while leaving the form in place on the Featured, Popular, and Recommended tabs.

Developed in https://github.com/WordPress/wordpress-develop/pull/11457.

Props manishxdp, bor0, westonruter, shailu25, sabbir1991.
Fixes #65026.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-plugin-install-list-table.php

    r61474 r62448  
    332332        /**
    333333         * Overrides parent views so we can use the filter bar display.
     334         *
     335         * @global string $tab The current tab.
    334336         */
    335337        public function views() {
     338                global $tab;
     339
    336340                $views = $this->get_views();
    337341
     
    359363        </ul>
    360364
    361                 <?php install_search_form(); ?>
     365                <?php
     366                if ( 'favorites' !== $tab ) {
     367                        install_search_form();
     368                }
     369                ?>
    362370</div>
    363371                <?php
Note: See TracChangeset for help on using the changeset viewer.