wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



is_post_status_viewable › Les Filtres WordPress

Depuis5.9.0
Dépréciéen/a
› apply_filters( 'is_post_status_viewable', $is_viewable, $post_status )
Paramètres: (2)
  • () is_viewable Whether the post status is "viewable" (strict type).
    Requis: Oui
  • () post_status Post status object.
    Requis: Oui
Défini(e) dans:
Codex:

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.




Source

return true === apply_filters( 'is_post_status_viewable', $is_viewable, $post_status );