Plugin / Widget Sorting Feature
|Reported by:||ttech5593||Owned by:|
This patch is one function that allows sorting of Wordpress plugins. It groups Plugins together and Widgets together in tabs under the Plugin Managment tab. If enabled by the option in the WP Options Miscellaneous section. If it is disabled no new tabs are added and no sorting happens. If enabled it will remove plugins from the Widget tab and Widgets from the plugin tab.
I did this because many plugins now come with Widgets and it can cause a mess with find a plugin or widget. This reduces the list and allows faster finding. It works even if the Automattic Widgets plugin is not installed / enabled.
I had to add the widget.php file because the Wordpress admin menu did not think plugins.php?sort_by=widgets was a different page then plugins.php. Here is the note I left at the top of widgets.php:
/*This file is here because I could not get WP to think plugins.php?sort_by=widgets was a different page from plugins.php. It is the exact same code as in plugins.php only on line 92, I call the added function wp_sort_plugins() and set it to ignore the $_GET requests since it is not needed. plugin.php the function is there so if sorting is enabled only plugins will show up. If that problem can be solved there is no need for this file. */