[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 09:56:21 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 | Keywords:
Focuses: |
-------------------------+-----------------------------
Part of "PHP APIs Overview" in Gutenberg:
https://github.com/WordPress/gutenberg/issues/8352.
`get_posts` accepts three arguments at the moment:
https://developer.wordpress.org/reference/functions/get_post/#parameters
The proposal is to expand the `$filter` parameter to accept also `blocks`
as an option:
> (string) (Optional) Type of filter to apply. Accepts 'raw', 'edit',
'db', or 'display'.
> Default value: 'raw'
The implementation details are still to be defined but it would probably
require a
[https://developer.wordpress.org/reference/functions/parse_blocks/
`parse_block`] function call.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/53602>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list