[wp-trac] [WordPress Trac] #49628: Add is_post_type_viewable filter
WordPress Trac
noreply at wordpress.org
Mon Nov 8 00:11:03 UTC 2021
#49628: Add is_post_type_viewable filter
---------------------------------------------+-----------------------------
Reporter: powerbuoy | Owner: hellofromTonya
Type: feature request | Status: closed
Priority: normal | Milestone: 5.9
Component: Posts, Post Types | Version: 5.3.2
Severity: normal | Resolution: fixed
Keywords: has-patch needs-dev-note commit | Focuses: administration
---------------------------------------------+-----------------------------
Comment (by hellofromTonya):
In thinking about what happens if the wrong data type is returned, I'm
thinking a better solution is to return the unfiltered, original boolean
state. That way the integrity of the core logic is maintained. In other
words, if a non-boolean is returned, throw it away and use the original
`$is_viewable`.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/49628#comment:18>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list