Block Bindings API: Add block bindings "Post data" source#57260
Closed
SantosGuillamot wants to merge 17 commits intoadd/block-bindings-api-editor-ui-and-apisfrom
Closed
Block Bindings API: Add block bindings "Post data" source#57260SantosGuillamot wants to merge 17 commits intoadd/block-bindings-api-editor-ui-and-apisfrom
SantosGuillamot wants to merge 17 commits intoadd/block-bindings-api-editor-ui-and-apisfrom
Conversation
|
This pull request has changed or added PHP files. Please confirm whether these changes need to be synced to WordPress Core, and therefore featured in the next release of WordPress. If so, it is recommended to create a new Trac ticket and submit a pull request to the WordPress Core Github repository soon after this pull request is merged. If you're unsure, you can always ask for help in the #core-editor channel in WordPress Slack. Thank you! ❤️ View changed files❔ lib/experimental/block-bindings/sources/post-data.php ❔ lib/experimental/block-bindings/index.php |
|
Size Change: +93 B (0%) Total Size: 1.71 MB
ℹ️ View Unchanged
|
42 tasks
Contributor
Author
|
I believe these are the remaining issues for this part of the prototype. Although we could work on them after this PR is merged.
|
9d2c667 to
a17a2b5
Compare
11ba9d7 to
934715b
Compare
Contributor
Author
|
Closing this because the block bindings API implementation has changed, and it should follow a different approach. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request is built on top of #57258
What?
Using the mechanisms provided by #57249 and #57258, this pull request adds support for the "Site Data" source. It allows users to connect block attributes with the "Site Title", "Site URL", and "Site Description". We can extend this list to whatever fields we consider.
Why?
It showcases how to create new sources in the block bindings API and provides more possibilities for users allowing to connect not only to post meta but also for post data.
How?
register_block_bindings_sourcefunction to register the source in the server, using theget_postfunction as the callback.BlockBindingsFillandBlockBindingsFieldsListcomponents to inject the Post Data fields in the editor.Testing Instructions
Repeat the testing in #57258 but using the Post Data as the source.
Remaining issues