[wp-trac] [WordPress Trac] #54375: Add is_post_status_viewable filter
WordPress Trac
noreply at wordpress.org
Mon Nov 8 15:52:49 UTC 2021
#54375: Add is_post_status_viewable filter
-----------------------------------------------+---------------------------
Reporter: peterwilsoncc | Owner:
| hellofromTonya
Type: enhancement | Status: reopened
Priority: normal | Milestone: 5.9
Component: Posts, Post Types | Version:
Severity: normal | Resolution:
Keywords: needs-patch needs-dev-note commit | Focuses:
-----------------------------------------------+---------------------------
Changes (by SergeyBiryukov):
* status: closed => reopened
* resolution: fixed =>
Comment:
It seems like this is a more common pattern in core to ensure a boolean
return type from a filter:
{{{
return (bool) apply_filters( ... );
}}}
It's used in at least five other instances and appears to achieve the same
goal. Is there a reason not follow that pattern here? Personally, I find
it much easier to navigate the code later when similar things are done in
a consistent way :)
The same applies to [52045].
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54375#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list