Repository navigation
Conversation
…cessing. Server processing now removes `data-wp-bind--data-wp-*` directives from output and reports incorrect usage. A binding must not set, replace or remove another Interactivity API directive attribute. The check runs on the attribute name before the suffix and unique ID checks, so bindings with a unique ID are removed as well. Follows r65228, which gave event handler bindings the same treatment. See #66452.
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
|
peterwilsoncc
left a comment
There was a problem hiding this comment.
A note inline about naming conventions in tests. Happy with the src changes.
| * | ||
| * @return array<non-empty-string, array{ attribute: non-empty-string }> Data provider. | ||
| */ | ||
| public static function data_directive_bindings(): array { |
There was a problem hiding this comment.
| public static function data_directive_bindings(): array { | |
| public static function data_wp_bind_removes_directive_bindings(): array { |
Per handbook, single use data providers ought to be named for the their test with a modified prefix.
🔢 This will require a change in the docblock too.
- Also, the data provider ought to sit immediately below the test, rather than above. This will look a bit messy as an inline suggestion, so I'll leave it for you.
Remove directive bind directives,
data-wp-bind--data-wp-*, during server processing. A binding cannot set, another Interactivity API directive attribute, so the server now removes such bindings instead of evaluating them.This is a follow-up to r65228, which gave event handler bindings the same treatment.
Trac ticket: https://core.trac.wordpress.org/ticket/66452
Use of AI Tools
AI assistance: Yes
Tools: Claude Code
Models: Claude Fable 5.1
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.