Action hooks to add search actions and filters
Two action hooks were added to enhance searching: wpda_add_search_actions and wpda_add_search_filter. Use these actions to customize the search box of your list table. These action hooks apply to WordPress list tables only. They do not affect publications.
Action hook wpda_add_search_actions
Added to allow developers to add actions to the search bar (e.g. an icon).
public function my_add_search_actions( $schema_name, $table_name, $table_settings, $wpda_list_columns ) {
// Your code goes here...
}
add_action( 'wpda_add_search_actions', 'my_add_search_actions', 10, 4 );
Action hook wpda_add_search_filter
Added to allow developers to add their own HTML and JavaScript to the search bar.
public function my_add_search_filter( $schema_name, $table_name, $table_settings, $wpda_list_columns ) {
// Your code goes here...
}
add_action( 'wpda_add_search_filter', 'my_add_search_filter', 10, 4 );
Parameters
Both action hooks are using the same parameters:
$schema_name
Database schema name (datebase name)
$table_name
Database table name
$table_settings
Table settings as defined in the Data Explorer
$wpda_list_columns
Reference to column list (instance of class WPDA_List_Columns)