Core Function
View Source on Trac ↗ is_post_publicly_viewable()
is_post_publicly_viewable( mixed $post = null ) Determines whether a post is publicly viewable.
Parameters 1 required
| Name / Type | Description |
|---|---|
| (int | | WP_Post | null) $post Optional. Post ID or post object. Defaults to global $post. Required |
Return Value
(bool)
Whether the post is publicly viewable.
Function Information
Since Version
5.7.0
Source File
wp-includes/post.php
Advertisement