install_plugins_table_api_args_<tab>
Filters API request arguments for each Plugin Install screen tab.
Description
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.
- $args = apply_filters( 'install_plugins_table_api_args_{$tab}', $args );
- if ( !empty( $args ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the install_plugins_table_api_args_<tab> callback
- function filter_install_plugins_table_api_args_tab( $args ) {
- // make filter magic happen here...
- return $args;
- };
- // add the filter
- 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.
- // remove the filter
- 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
- $args = apply_filters( "install_plugins_table_api_args_{$tab}", $args );