Make WordPress Core


Ignore:
Timestamp:
09/26/2023 04:17:18 PM (15 months ago)
Author:
Bernhard Reiter
Message:

Templates: Deprecate _inject_theme_attribute_in_block_template_content.

It can be replaced by passing _inject_theme_attribute_in_template_part_block as second argument to traverse_and_serialize_blocks().

Per WordPress 6.4 Beta 1, there aren't going to be any more calls in Core to _inject_theme_attribute_in_block_template_content().

Note that _inject_theme_attribute_in_block_template_content has always had @access private set in its PHPDoc.

Props gziolo.
Fixes #59452.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/block-template-utils.php

    r56649 r56719  
    476476 *
    477477 * @since 5.9.0
     478 * @deprecated 6.4.0 Use traverse_and_serialize_blocks( parse_blocks( $template_content ), '_inject_theme_attribute_in_template_part_block' ) instead.
    478479 * @access private
    479480 *
     
    482483 */
    483484function _inject_theme_attribute_in_block_template_content( $template_content ) {
     485    _deprecated_function(
     486        __FUNCTION__,
     487        '6.4.0',
     488        'traverse_and_serialize_blocks( parse_blocks( $template_content ), "_inject_theme_attribute_in_template_part_block" )'
     489    );
     490
    484491    $has_updated_content = false;
    485492    $new_content         = '';
Note: See TracChangeset for help on using the changeset viewer.