wppaste
WordPress

apply_filters( 'wp_list_table_show_post_checkbox', bool $show, WP_Post $post )

Since
5.7.0
Filters whether to show the bulk edit checkbox for a post in its list table.

Description

By default the checkbox is only shown if the current user can edit the post.

Compatibility

WordPress
since 5.7.0
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Parameters

$showbool
Whether to show the checkbox.
$postWP_Post
The current WP_Post object.

Where this hook fires · 1

  • wp-admin/includes/class-wp-posts-list-table.php:1040WP_Posts_List_Table::column_cb()

Source code

		 *		 * @since 5.7.0		 *		 * @param bool    $show Whether to show the checkbox.		 * @param WP_Post $post The current WP_Post object.		 */		if ( apply_filters( 'wp_list_table_show_post_checkbox', $show, $post ) ) :			?>			<input id="cb-select-<?php the_ID(); ?>" type="checkbox" name="post[]" value="<?php the_ID(); ?>" />			<label for="cb-select-<?php the_ID(); ?>">				<span class="screen-reader-text">				<?php					/* translators: %s: Post title. */

Changelog

Introduced in 5.7.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 6.7.7 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.