From 2befec291f4cc960b4f67d01ce277dade80314bc Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Thu, 26 Sep 2013 02:48:09 +0000 Subject: [PATCH] Inline documentation for hooks in wp-admin/includes/class-wp-plugin-install-list-table.php. Props naomicbush. Fixes #25357. Built from https://develop.svn.wordpress.org/trunk@25630 git-svn-id: http://core.svn.wordpress.org/trunk@25547 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- .../class-wp-plugin-install-list-table.php | 45 ++++++++++++++++++- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/class-wp-plugin-install-list-table.php b/wp-admin/includes/class-wp-plugin-install-list-table.php index d78f4e7e15..6cae9cef63 100644 --- a/wp-admin/includes/class-wp-plugin-install-list-table.php +++ b/wp-admin/includes/class-wp-plugin-install-list-table.php @@ -37,7 +37,23 @@ class WP_Plugin_Install_List_Table extends WP_List_Table { $nonmenu_tabs = array( 'plugin-information' ); //Valid actions to perform which do not have a Menu item. + /** + * Filter the tabs shown on the Plugin Install screen. + * + * @since 2.7.0 + * + * @param array $tabs The tabs shown on the Plugin Install screen. Defaults are 'dashboard', 'search', + * 'upload', 'featured', 'popular', 'new', and 'favorites'. + */ $tabs = apply_filters( 'install_plugins_tabs', $tabs ); + + /** + * Filter tabs not associated with a menu item on the Plugin Install screen. + * + * @since 2.7.0 + * + * @param array $nonmenu_tabs The tabs that don't have a Menu item on the Plugin Install screen. + */ $nonmenu_tabs = apply_filters( 'install_plugins_nonmenu_tabs', $nonmenu_tabs ); // If a non-valid menu tab has been selected, And it's not a non-menu action. @@ -88,7 +104,18 @@ class WP_Plugin_Install_List_Table extends WP_List_Table { break; } - $args = apply_filters( 'install_plugins_table_api_args_' . $tab, $args ); + /** + * Filter API request arguments for each Plugin Install screen tab. + * + * The dynamic portion of the hook name, $tab, refers to the plugin install tabs. + * Default tabs are 'dashboard', 'search', 'upload', 'featured', 'popular', 'new', + * and 'favorites'. + * + * @since 3.7.0 + * + * @param array|bool $args Plugin Install API arguments. + */ + $args = apply_filters( "install_plugins_table_api_args_$tab", $args ); if ( !$args ) return; @@ -127,7 +154,13 @@ class WP_Plugin_Install_List_Table extends WP_List_Table { if ( 'top' == $which ) { ?>
- +
pagination( $which ); ?>
@@ -221,6 +254,14 @@ class WP_Plugin_Install_List_Table extends WP_List_Table { } } + /** + * Filter the install action links for a plugin. + * + * @since 2.7.0 + * + * @param array $action_links An array of plugin action hyperlinks. Defaults are links to Details and Install Now. + * @param array $plugin The plugin currently being listed. + */ $action_links = apply_filters( 'plugin_install_action_links', $action_links, $plugin ); ?>