wp_list_table_show_post_checkbox
Filters whether to show the bulk edit checkbox for a post in its list table.
By default the checkbox is only shown if the current user can edit the post.
Usage
add_filter( 'wp_list_table_show_post_checkbox', 'wp_kama_list_table_show_post_checkbox_filter', 10, 2 ); /** * Function for `wp_list_table_show_post_checkbox` filter-hook. * * @param bool $show Whether to show the checkbox. * @param WP_Post $post The current WP_Post object. * * @return bool */ function wp_kama_list_table_show_post_checkbox_filter( $show, $post ){ // filter... return $show; }
- $show(true|false)
- Whether to show the checkbox.
- $post(WP_Post)
- The current WP_Post object.
Changelog
Since 5.7.0 | Introduced. |
Where the hook is called
wp_list_table_show_post_checkbox
wp-admin/includes/class-wp-posts-list-table.php 1035
if ( apply_filters( 'wp_list_table_show_post_checkbox', $show, $post ) ) :