Make WordPress Core

Opened 7 months ago

Closed 7 months ago

Last modified 7 months ago

#59460 closed enhancement (fixed)

Templates: Introduce _remove_theme_attribute_from_template_part_block function

Reported by: bernhard-reiter's profile Bernhard Reiter Owned by: bernhard-reiter's profile Bernhard Reiter
Milestone: 6.4 Priority: normal
Severity: normal Version:
Component: General Keywords: has-patch has-unit-tests
Focuses: Cc:

Description

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).

Change History (3)

This ticket was mentioned in PR #5316 on WordPress/wordpress-develop by @Bernhard Reiter.


7 months ago
#1

  • Keywords has-patch has-unit-tests added

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

#2 @Bernhard Reiter
7 months ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 56724:

Templates: Introduce _remove_theme_attribute_from_template_part_block.

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).

Props mukesh27.
Fixes #59460.

Note: See TracTickets for help on using tickets.