[wp-trac] [WordPress Trac] #36344: WP_Query: Allow passing a string for post_parent__not_in
WordPress Trac
noreply at wordpress.org
Sat Mar 26 13:05:00 UTC 2016
#36344: WP_Query: Allow passing a string for post_parent__not_in
-------------------------+------------------------------
Reporter: tavo962 | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Query | Version: 4.4.2
Severity: normal | Resolution:
Keywords: | Focuses:
-------------------------+------------------------------
Comment (by swissspidy):
`post_parent__not_in` is not the only parameter that is required to be an
array. In fact, only few can be either a string or an array, e.g
`post_type`, `orderby` and `post_status`. For these params it makes sense,
because most of the time you'll only need to pass a single string.
In my opinion array-only makes sense for `post_parent__not_in` because
developers usually populate it with dynamic values (e.g. from an other
query).
In any case, if this enhancement gets traction, `post_parent__not_in`
shouldn't be the only one being changed.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36344#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list