Block bindings: Add filter for supported block attributes #7404
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.
Adds a filter called block_bindings_supported_block_attributes to allow adding blocks / attributes to the supported list.
This list of allowed attributes for block bindings is the only thing in core keeping us from making larger use of block bindings for our Remote Data Blocks plugin. The bindings already work how we need them to, they just aren't allowed on custom blocks, and this filter will allow us to add additional blocks / attributes to the list so we can hook remote data up to dynamic blocks using the standard block binding functionality.
For our use case, the use of this will be abstracted away by our plugin and it would not be super problematic to deprecate this filter if another approach is decided on in the future. But without this change making it into 6.7, it means our RDB plugin will be severely limited in functionality until at least 6.8, so getting this merged would be huge for us.
Trac ticket: https://core.trac.wordpress.org/ticket/62090
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.