-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Block Bindings: Update source registration syntax and remove APIs that should be private #58205
Block Bindings: Update source registration syntax and remove APIs that should be private #58205
Conversation
6ada5c3
to
ddd569e
Compare
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/compat/wordpress-6.5/block-bindings/block-bindings.php ❔ lib/compat/wordpress-6.5/block-bindings/class-wp-block-bindings.php ❔ lib/compat/wordpress-6.5/block-bindings/sources/pattern.php ❔ lib/compat/wordpress-6.5/block-bindings/sources/post-meta.php ❔ lib/compat/wordpress-6.5/blocks.php |
Flaky tests detected in c9a245e. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/7644439081
|
@@ -29,7 +29,9 @@ | |||
}; | |||
wp_block_bindings_register_source( | |||
'pattern_attributes', | |||
__( 'Pattern Attributes', 'gutenberg' ), | |||
$pattern_source_callback | |||
array( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should be no textdomain used for translations expected to land in core.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I removed it for both the pattern
and post-meta
sources in c9a245e
cc29eac
to
3fda653
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pending passing tests, looks good to me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tested it, and everything seems to keep working fine 🙂
// TODO: This shouldn't be needed when the `set_inner_html` function is ready. | ||
// Store the parent tag and its attributes to be able to restore them later in the button. | ||
// The button block has a wrapper while the paragraph and heading blocks don't. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you are backporting this file, make sure that multilines comments are with /* */
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Carlos! The backport is here btw WordPress/wordpress-develop#5888 if you ever want to have a look.
I noticed this PR was merged after I raised the PHP Sync Tracking Issue for WP 6.5 and has changed PHP files that may need backporting to WP Core. Please forgive the ping, but I marked as |
@getdave Backported to Core in WordPress/wordpress-develop#5888 |
There are a few changes in this PR:
Following WordPress/wordpress-develop#5888 I've:
replace_html()
method of theWP_Block_Bindings
classreplace_html()
from theWP_Block_Bindings
class to theblock-bindings.php
file