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. Built from https://develop.svn.wordpress.org/trunk@58090 git-svn-id: http://core.svn.wordpress.org/trunk@57555 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
629273d54f
commit
1c20a0a820
|
@ -19,24 +19,6 @@ function wp_get_elements_class_name( $block ) {
|
|||
return 'wp-elements-' . md5( serialize( $block ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the block content with elements class names.
|
||||
*
|
||||
* @deprecated 6.6.0 Generation of element class name is handled via `render_block_data` filter.
|
||||
*
|
||||
* @since 5.8.0
|
||||
* @since 6.4.0 Added support for button and heading element styling.
|
||||
* @access private
|
||||
*
|
||||
* @param string $block_content Rendered block content.
|
||||
* @param array $block Block object.
|
||||
* @return string Filtered block content.
|
||||
*/
|
||||
function wp_render_elements_support( $block_content, $block ) {
|
||||
_deprecated_function( __FUNCTION__, '6.6.0', 'wp_render_elements_class_name' );
|
||||
return $block_content;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines whether an elements class name should be added to the block.
|
||||
*
|
||||
|
@ -134,7 +116,7 @@ function wp_render_elements_support_styles( $parsed_block ) {
|
|||
* `render_block_data` filter in 6.6.0 to avoid filtered attributes
|
||||
* breaking the application of the elements CSS class.
|
||||
*
|
||||
* @see https://github.com/WordPress/gutenberg/pull/59535.
|
||||
* @see https://github.com/WordPress/gutenberg/pull/59535
|
||||
*
|
||||
* The change in filter means, the argument types for this function
|
||||
* have changed and require deprecating.
|
||||
|
@ -259,7 +241,6 @@ function wp_render_elements_support_styles( $parsed_block ) {
|
|||
*
|
||||
* @param string $block_content Rendered block content.
|
||||
* @param array $block Block object.
|
||||
*
|
||||
* @return string Filtered block content.
|
||||
*/
|
||||
function wp_render_elements_class_name( $block_content, $block ) {
|
||||
|
|
|
@ -6300,3 +6300,21 @@ function block_core_image_ensure_interactivity_dependency() {
|
|||
$wp_scripts->registered['wp-block-image-view']->deps[] = 'wp-interactivity';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the block content with elements class names.
|
||||
*
|
||||
* @deprecated 6.6.0 Generation of element class name is handled via `render_block_data` filter.
|
||||
*
|
||||
* @since 5.8.0
|
||||
* @since 6.4.0 Added support for button and heading element styling.
|
||||
* @access private
|
||||
*
|
||||
* @param string $block_content Rendered block content.
|
||||
* @param array $block Block object.
|
||||
* @return string Filtered block content.
|
||||
*/
|
||||
function wp_render_elements_support( $block_content, $block ) {
|
||||
_deprecated_function( __FUNCTION__, '6.6.0', 'wp_render_elements_class_name' );
|
||||
return $block_content;
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.6-alpha-58089';
|
||||
$wp_version = '6.6-alpha-58090';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue