[wp-trac] [WordPress Trac] #53602: Expand get_posts $filter parameter to allow a blocks as a return shape
WordPress Trac
noreply at wordpress.org
Tue Jul 6 16:39:50 UTC 2021
#53602: Expand get_posts $filter parameter to allow a blocks as a return shape
-------------------------+------------------------------
Reporter: gziolo | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Editor | Version: trunk
Severity: normal | Resolution:
Keywords: | Focuses:
-------------------------+------------------------------
Comment (by TimothyBlynJacobs):
This doesn't seem right to me. The purpose of `filter` is to apply certain
transformations to the `WP_Post` properties. So in this case, `blocks`
would have to be a proxy for one of the other filter values for the other
fields. Then if you wanted blocks, you'd lose the ability to set a desired
`filter` for the other fields.
Instead, it seems like we can introduce a `blocks` property on `WP_Post`
like `ancestors` and lazily `parse_blocks` when called.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/53602#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list