install_plugins_table_api_args_<tab>

Filters API request arguments for each Plugin Install screen tab.

Description

apply_filters( 'install_plugins_table_api_args_<tab>', (array|bool) $args ); 

The dynamic portion(s) of the hook name refer to the plugin install tabs. Default tabs include featured,, popular., recommended, favorites, and upload.

Parameters (1)

0. $args (array|bool)
Plugin Install API arguments.

Usage

To run the hook, copy the example below.
  1. $args = apply_filters( 'install_plugins_table_api_args_{$tab}', $args ); 
  2.  
  3. if ( !empty( $args ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the install_plugins_table_api_args_<tab> callback 
  2. function filter_install_plugins_table_api_args_tab( $args ) { 
  3. // make filter magic happen here... 
  4. return $args
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( "install_plugins_table_api_args_{$tab}", 'filter_install_plugins_table_api_args_tab', 10, 1 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( "install_plugins_table_api_args_{$tab}", 'filter_install_plugins_table_api_args_tab', 10, 1 ); 

Defined (1)

The filter is defined in the following location(s).

/wp-admin/includes/class-wp-plugin-install-list-table.php  
  1. $args = apply_filters( "install_plugins_table_api_args_{$tab}", $args );