From 907ca6cd309e32e741a58a158e6ae473e2bb719a Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Wed, 21 Aug 2013 06:52:12 +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 Built from https://develop.svn.wordpress.org/trunk@25070 git-svn-id: http://core.svn.wordpress.org/trunk@25055 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-plugin-install-list-table.php | 3 +++ wp-admin/includes/class-wp-theme-install-list-table.php | 3 +++ 2 files changed, 6 insertions(+) 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 76ef2ce2c1..d78f4e7e15 100644 --- a/wp-admin/includes/class-wp-plugin-install-list-table.php +++ b/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/wp-admin/includes/class-wp-theme-install-list-table.php b/wp-admin/includes/class-wp-theme-install-list-table.php index 8a46199f16..bb8328fb1b 100644 --- a/wp-admin/includes/class-wp-theme-install-list-table.php +++ b/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;