Skip to content

Commit 5207502

Browse files
Editor: Fix coding standards and move deprecated function to correct file.
Follow-up to [58074], formats docblocks correctly and moves `wp_render_elements_support` to the deprecated file. Props aaronrobertshaw, isabel_brison, mukesh27, spacedmonkey. See #60681. git-svn-id: https://develop.svn.wordpress.org/trunk@58090 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 6b328e6 commit 5207502

2 files changed

Lines changed: 19 additions & 20 deletions

File tree

src/wp-includes/block-supports/elements.php

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,6 @@ function wp_get_elements_class_name( $block ) {
1919
return 'wp-elements-' . md5( serialize( $block ) );
2020
}
2121

22-
/**
23-
* Updates the block content with elements class names.
24-
*
25-
* @deprecated 6.6.0 Generation of element class name is handled via `render_block_data` filter.
26-
*
27-
* @since 5.8.0
28-
* @since 6.4.0 Added support for button and heading element styling.
29-
* @access private
30-
*
31-
* @param string $block_content Rendered block content.
32-
* @param array $block Block object.
33-
* @return string Filtered block content.
34-
*/
35-
function wp_render_elements_support( $block_content, $block ) {
36-
_deprecated_function( __FUNCTION__, '6.6.0', 'wp_render_elements_class_name' );
37-
return $block_content;
38-
}
39-
4022
/**
4123
* Determines whether an elements class name should be added to the block.
4224
*
@@ -134,7 +116,7 @@ function wp_render_elements_support_styles( $parsed_block ) {
134116
* `render_block_data` filter in 6.6.0 to avoid filtered attributes
135117
* breaking the application of the elements CSS class.
136118
*
137-
* @see https://github.com/WordPress/gutenberg/pull/59535.
119+
* @see https://github.com/WordPress/gutenberg/pull/59535
138120
*
139121
* The change in filter means, the argument types for this function
140122
* have changed and require deprecating.
@@ -259,7 +241,6 @@ function wp_render_elements_support_styles( $parsed_block ) {
259241
*
260242
* @param string $block_content Rendered block content.
261243
* @param array $block Block object.
262-
*
263244
* @return string Filtered block content.
264245
*/
265246
function wp_render_elements_class_name( $block_content, $block ) {

src/wp-includes/deprecated.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6300,3 +6300,21 @@ function block_core_image_ensure_interactivity_dependency() {
63006300
$wp_scripts->registered['wp-block-image-view']->deps[] = 'wp-interactivity';
63016301
}
63026302
}
6303+
6304+
/**
6305+
* Updates the block content with elements class names.
6306+
*
6307+
* @deprecated 6.6.0 Generation of element class name is handled via `render_block_data` filter.
6308+
*
6309+
* @since 5.8.0
6310+
* @since 6.4.0 Added support for button and heading element styling.
6311+
* @access private
6312+
*
6313+
* @param string $block_content Rendered block content.
6314+
* @param array $block Block object.
6315+
* @return string Filtered block content.
6316+
*/
6317+
function wp_render_elements_support( $block_content, $block ) {
6318+
_deprecated_function( __FUNCTION__, '6.6.0', 'wp_render_elements_class_name' );
6319+
return $block_content;
6320+
}

0 commit comments

Comments
 (0)