Closed
Description
openedon Aug 1, 2018
This issue is an overview on the new PHP APIs remaining to be introduced or extended. Important aspects to keep in mind include internal consistency and consistency with other WP family of functions.
General
-
*_has_blocks
boolean check. - Add a
has_block( $block_name )
variation. Add has_block() function #3773 - Use
has_blocks()
to augment HTML classes likepost_class
. Generate body class for Gutenberg pages & provide helper function #4418, PR Add generic has_blocks function #8631 - Expose block data directly through REST API endpoints.
Add block data to REST API (post) response data #4763 - Expand
get_posts
filter parameter to allow ablocks
as a return shape. https://core.trac.wordpress.org/ticket/53602 -
get_post_blocks()
orget_blocks_from_post()
returning an array of blocks with their data. PR Introduce get_blocks function #9208 - Strip Blocks from auto-generated excerpts. Strip Blocks from Auto-Generated Excerpts #7268 ; related get_the_excerpt is taking PHP out of memory in a block rendering #5572, PR Introduce strip_dynamic_blocks() for excerpts #8984
- Make it easier to filter blocks on the server Apply a filter to each rendered static and dynamic block #11523
Block API
- Server-side awareness of block types. Block API: Server-side awareness of block types #2751
-
- Introduce block definitions and implementations. Block API: Introduce block definitions and implementations #6733
-
- Expose available blocks via an API. Expose available blocks via an API #4116
-
- Proper server-side APIs for block modification. Proper server-side APIs for block modification #6494
- Pass the block name to the render callback. Pass the block name to the render callback #4671
- Pass inner content to render callback (optionally?). Pass content to render callback #5760
- Ability to register / hook a callback without the non-idiomatic
register_block_type
requirement.Calling render_callback() without register_block_type? #4723Block API: Server-side awareness of block types #2751
To Consider
- A way to define block templates in page headers. Suggestion: Block templates in page template header #3835
- Support for accessing variations of a post in different languages through the REST API. Support for accessing variations of a post in different languages through the REST API #5958
Bugs
- get_the_excerpt is taking PHP out of memory in a block rendering. get_the_excerpt is taking PHP out of memory in a block rendering #5572, PR Introduce strip_dynamic_blocks() for excerpts #8984
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Labels
Issues related to broader framework topics, especially as it relates to javascriptNeeds a decision to be actionable or relevantAPI that allows to express the block paradigm.Comprehensive, high level view of an area of focus often with multiple tracking issuesIssues or PRs that have been broken down into an individual action to take