Install Themes/Plugins Custom Page Hooks
|Reported by:||amereservant||Owned by:|
Upon trying to add a custom page to the Plugins > Add New section for private plugins, I realized there wasn't a hook that allowed overriding the plugin_api call.
The custom tab on the page could easily be added via the install_plugins_tab filter, but in the class-wp-plugin-install-list-table.php class method prepare_items(), there isn't a hook to override the api call.
I checked the functions for the themes and it's the same thing, so I've added the patches containing the proposed filters for both classes in order to help future customization of WordPress by developers.
Here's an example of the custom tab and the desired results via the hooks in a plugin:
These filters can also be used to prohibit clients from adding 3rd-party plugins for security & performance reasons and even limit them to only using a private Repository API.