When viewing the Favorite Plugins tab, /wp-admin/plugin-install.php?tab=favorites
, the list comes unordered, is it possible to sort it from A to Z?
Leave a Reply
You must be logged in to post a comment.
When viewing the Favorite Plugins tab, /wp-admin/plugin-install.php?tab=favorites
, the list comes unordered, is it possible to sort it from A to Z?
You must be logged in to post a comment.
That page is rendered by the WP_Plugin_Install_List_Table class, which calls the function
plugins_api()
.In this function, we find two filter hooks that enable the manipulation of the table output:
plugins_api_args
andplugins_api_result
.The problem is that the API doesn’t offer an ordered query, so we can only sort each page results. The solution is to increase the number of items per page until no paging is necessary. The default limit is 30 plugins.
Related Q&A:
Relevant links:
The following plugin sorts the list by a given argument (
name
,requires
and others, from the Plugin API response).