Commit Graph

13 Commits

Author SHA1 Message Date
Sergey Biryukov
bd77cc433d Docs: Correct alignment in WP_Block_Bindings_Registry::register() DocBlock.
Follow-up to [57373], [57375], [57641].

Props nareshbheda, mukesh27.
Fixes #61412.
Built from https://develop.svn.wordpress.org/trunk@58395


git-svn-id: http://core.svn.wordpress.org/trunk@57844 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-12 12:44:13 +00:00
John Blackbourn
3d9945486e Docs: Various docblock improvements.
See #60699

Built from https://develop.svn.wordpress.org/trunk@58075


git-svn-id: http://core.svn.wordpress.org/trunk@57540 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-02 13:19:14 +00:00
John Blackbourn
9e7d08b60d Docs: Various docblock corrections.
See #60699

Built from https://develop.svn.wordpress.org/trunk@58073


git-svn-id: http://core.svn.wordpress.org/trunk@57538 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-02 00:01:09 +00:00
Sergey Biryukov
46356f0215 Docs: Remove extra space before @since in WP_Block_Bindings_Registry DocBlock.
Follow-up to [57373].

Props shailu25.
Fixes #61046.
Built from https://develop.svn.wordpress.org/trunk@58027


git-svn-id: http://core.svn.wordpress.org/trunk@57493 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-21 03:52:11 +00:00
gziolo
c0ed2c6f06 Editor: Merge uses_context defined by block bindings sources with block types
Adds logic that fixes the limitation for souces by allowing merging the `uses_context` defined by block bindings sources into supported block types. Each source defines the context it needs and it is added to the block types that are using the block bindings API.

Fixes #60525.
Props santosguillamot, gziolo, czapla, thekt12.



Built from https://develop.svn.wordpress.org/trunk@57641


git-svn-id: http://core.svn.wordpress.org/trunk@57142 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-16 12:55:11 +00:00
gziolo
66badc5b0d Editor: Add wakeup magic method to the block bindings registry
See #60282.
Follow-up [57373].
Props dmsnell, mukesh27, gziolo.


Built from https://develop.svn.wordpress.org/trunk@57575


git-svn-id: http://core.svn.wordpress.org/trunk@57076 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-09 10:54:11 +00:00
gziolo
b19e148a07 Editor: Introduce WP_Block_Bindings_Source class
Abstracts the block bindings source array into a well-defined object.

Fixes #60447.
See #60282.
Follow-up [57373].
Props czapla, santosguillamot, gziolo.


Built from https://develop.svn.wordpress.org/trunk@57562


git-svn-id: http://core.svn.wordpress.org/trunk@57063 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-08 08:57:07 +00:00
gziolo
0d374ffc6b Editor: Improve code documentation for block bindings
Follow-up [57514].
See #60282.
Props czapla, gziolo, retrofox.


Built from https://develop.svn.wordpress.org/trunk@57560


git-svn-id: http://core.svn.wordpress.org/trunk@57061 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-08 08:37:09 +00:00
gziolo
742e8aae9c Editor: Refactor the way block bindings sources are handled
It fixes the coding style issues reported. It goes further and improves the code quality it other places where the logic for block bindings was added.

Follow-up for [57514].
Props: gziolo, mukesh27, youknowriad, santosguillamot.
See #60282.


Built from https://develop.svn.wordpress.org/trunk@57526


git-svn-id: http://core.svn.wordpress.org/trunk@57027 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-02 20:24:12 +00:00
youknowriad
a2786a3785 Editor: Add the Block Bindings API.
This introduces the Block Bindings API for WordPress.

The API allows developers to connects block attributes to different sources. In this PR, two such sources are included: "post meta" and "pattern". Attributes connected to sources can have their HTML replaced by values coming from the source in a way defined by the binding.

Props czapla, lgladdy, gziolo, sc0ttkclark, swissspidy, artemiosans, kevin940726, fabiankaegy, santosguillamot, talldanwp, wildworks.
Fixes #60282.
Built from https://develop.svn.wordpress.org/trunk@57514


git-svn-id: http://core.svn.wordpress.org/trunk@57015 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-01 12:54:15 +00:00
Pascal Birchler
112955169b Editor: fix small typos in block bindings API docblocks.
Props shailu25.
See #60282.
Fixes #60386.
Built from https://develop.svn.wordpress.org/trunk@57500


git-svn-id: http://core.svn.wordpress.org/trunk@57001 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-31 13:01:58 +00:00
gziolo
81bb2d56e7 Editor: Add Block Bindings API helpers
It is part of the sync from the Gutenberg plugin that introduces the registry for block binding sources required for the new Block Bindings API: WordPress/gutenberg#54536.

See #60282.
Follow-up [57373].
Props czapla, artemiosans, santosguillamot, sc0ttkclark, lgladdy, talldanwp, swissspidy, youknowriad, fabiankaegy, mukesh27.


Built from https://develop.svn.wordpress.org/trunk@57375


git-svn-id: http://core.svn.wordpress.org/trunk@56881 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 13:08:16 +00:00
gziolo
f1a977e357 Editor: Add registry for block binding sources
It is part of the sync from the Gutenberg plugin that introduces the registry for block binding sources required for the new Block Bindings API: https://github.com/WordPress/gutenberg/issues/54536.

See #60282.
Props czapla, artemiosans, santosguillamot, sc0ttkclark, lgladdy, talldanwp, swissspidy, youknowriad, fabiankaegy.


Built from https://develop.svn.wordpress.org/trunk@57373


git-svn-id: http://core.svn.wordpress.org/trunk@56879 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 11:16:16 +00:00