Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Templates: Deprecate _inject_theme_attribute_in_template_part_block().
  • Loading branch information
ockham committed Sep 26, 2023
commit 6c83a133cbee9a7bbb22d9fb5080e2d73a4c7ba1
3 changes: 3 additions & 0 deletions src/wp-includes/block-template-utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -475,12 +475,15 @@ function _flatten_blocks( &$blocks ) {
* stylesheet as a theme attribute into each wp_template_part
*
* @since 5.9.0
* @deprecated 6.4.0 Use _inject_theme_attribute_in_template_part_block() with traverse_and_serialize_blocks() instead.
* @access private
*
* @param string $template_content serialized wp_template content.
* @return string Updated 'wp_template' content.
*/
function _inject_theme_attribute_in_block_template_content( $template_content ) {
_deprecated_function( __FUNCTION__, '6.4.0' );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can also put the message with the new recommendation as 3rd argument in the call.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


$has_updated_content = false;
$new_content = '';
$template_blocks = parse_blocks( $template_content );
Expand Down