Skip to content

Templates: Introduce _remove_theme_attribute_from_template_part_block function#5316

Closed
ockham wants to merge 6 commits into
WordPress:trunkfrom
ockham:add/remove-theme-attribute-from-template-part-block
Closed

Templates: Introduce _remove_theme_attribute_from_template_part_block function#5316
ockham wants to merge 6 commits into
WordPress:trunkfrom
ockham:add/remove-theme-attribute-from-template-part-block

Conversation

@ockham

@ockham ockham commented Sep 26, 2023

Copy link
Copy Markdown
Contributor

Introduce a _remove_theme_attribute_from_template_part_block() function that can be used as a callback argument for traverse_and_serialize_block(s) on a parsed block tree in order to remove the theme attribute from all Template Part blocks found therein, and deprecate _remove_theme_attribute_in_block_template_content().

Counterpart to _inject_theme_attribute_in_template_part_block from #59338 (which superseded _inject_theme_attribute_in_block_template_content, deprecated in #59452).

Trac ticket: https://core.trac.wordpress.org/ticket/59460


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.

@ockham ockham self-assigned this Sep 26, 2023
@ockham ockham requested a review from gziolo September 26, 2023 16:22
Comment thread src/wp-includes/block-template-utils.php Outdated
@ockham ockham force-pushed the add/remove-theme-attribute-from-template-part-block branch from 508daf1 to 66afb4f Compare September 26, 2023 16:52
@ockham ockham marked this pull request as ready for review September 26, 2023 17:05
@ockham

ockham commented Sep 26, 2023

Copy link
Copy Markdown
Contributor Author

Committed to Core in https://core.trac.wordpress.org/changeset/56724.

@ockham ockham closed this Sep 26, 2023
@ockham ockham deleted the add/remove-theme-attribute-from-template-part-block branch September 26, 2023 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants