From b4f0fbd985447b1fc14ffde1c4c3344f488d8fb9 Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Wed, 21 Aug 2013 06:51:51 +0000 Subject: [PATCH] Add a filter on the Plugin and Theme installers table listing API args, this allows for plugins to hook in and add custom args to plugins_api() and themes_api() for the Plugin/Theme listing tabls. Fixes #18169 git-svn-id: https://develop.svn.wordpress.org/trunk@25070 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/class-wp-plugin-install-list-table.php | 3 +++ src/wp-admin/includes/class-wp-theme-install-list-table.php | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/wp-admin/includes/class-wp-plugin-install-list-table.php b/src/wp-admin/includes/class-wp-plugin-install-list-table.php index 76ef2ce2c1..d78f4e7e15 100644 --- a/src/wp-admin/includes/class-wp-plugin-install-list-table.php +++ b/src/wp-admin/includes/class-wp-plugin-install-list-table.php @@ -85,8 +85,11 @@ class WP_Plugin_Install_List_Table extends WP_List_Table { default: $args = false; + break; } + $args = apply_filters( 'install_plugins_table_api_args_' . $tab, $args ); + if ( !$args ) return; diff --git a/src/wp-admin/includes/class-wp-theme-install-list-table.php b/src/wp-admin/includes/class-wp-theme-install-list-table.php index 8a46199f16..bb8328fb1b 100644 --- a/src/wp-admin/includes/class-wp-theme-install-list-table.php +++ b/src/wp-admin/includes/class-wp-theme-install-list-table.php @@ -90,8 +90,11 @@ class WP_Theme_Install_List_Table extends WP_Themes_List_Table { default: $args = false; + break; } + $args = apply_filters( 'install_themes_table_api_args_' . $tab, $args ); + if ( ! $args ) return;