Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#59460 closed enhancement (fixed)

Templates: Introduce _remove_theme_attribute_from_template_part_block function

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

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.


3 years 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
3 years ago

  • Resolution → fixed
  • Status assigned → 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.