wp_list_table_show_post_checkbox WordPress Filter Hook

The wp_list_table_show_post_checkbox hook is a powerful way to add checkboxes to your posts, pages, and custom post types. This hook allows you to add a checkbox to the default WordPress post table, as well as any custom post type you might create. The checkbox will be displayed next to each post, allowing you to select multiple posts at once. This is a great way to bulk edit your content, or to simply select a group of posts to perform an action on.

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

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.


Top ↑

Parameters

$show

(bool)Whether to show the checkbox.

$post

(WP_Post)The current WP_Post object.


Top ↑

Source

File: wp-admin/includes/class-wp-posts-list-table.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
5.7.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.