Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: is_post_status_viewable

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
2326       * is by design to maintain backwards-compatibility and guard against
2327       * potential type errors in PHP 8.1+. Non-boolean values (even falsey
2328       * and truthy values) will result in the function returning false.
2329       *
2330       * @since 5.9.0
2331       *
2332       * @param bool     $is_viewable Whether the post status is "viewable" (strict type).
2333       * @param stdClass $post_status Post status object.
2334       */
2335      return true === apply_filters( 'is_post_status_viewable', $is_viewable, $post_status );
2336 }
2337
2338 /**
2339  * Determine whether a post is publicly viewable.
2340  *
2341  * Posts are considered publicly viewable if both the post status and post type
2342  * are viewable.
2343  *
2344  * @since 5.7.0