Filters whether a post status is considered "viewable".
Description
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.
Parameters
$is_viewablebool
Whether the post status is "viewable" (strict type).
2522*2523* @since 5.9.02524*2525* @param bool$is_viewable Whether the post status is "viewable"(strict type).2526* @param stdClass$post_status Post status object.2527*/2528returntrue===apply_filters('is_post_status_viewable',$is_viewable,$post_status);2529}25302531/**2532* Determines whether a post is publicly viewable.2533*2534* Posts are considered publicly viewable if both the post status and post type
History
Introduced in 5.9.0. Unchanged from 6.7.7 through 7.1.0.