WordPress Hooks Explorer

Listing all hooks extracted WordPress Core


Details about is_post_status_viewable

Back to home

Files

Filename Hook Type Line Number PHP Doc
wp-includes/post.php apply_filters 2321 /**
* Filters whether a post status is considered "viewable".
*
* The returned filtered value must be a boolean type to ensure
* `is_post_status_viewable()` only returns a boolean. This strictness
* is by design to maintain backwards-compatibility and guard against
* potential type errors in PHP 8.1+. Non-boolean values (even falsey
* and truthy values) will result in the function returning false.
*
* @since 5.9.0
*
* @param bool $is_viewable Whether the post status is "viewable" (strict type).
* @param stdClass $post_status Post status object.
*/

Hook Parameters

Parameter Type Name Description
bool $is_viewable Whether the post status is "viewable" (strict type).
stdClass $post_status Post status object.