Make WordPress Core

Changeset 58090


Ignore:
Timestamp:
05/03/2024 05:23:42 AM (2 weeks ago)
Author:
isabel_brison
Message:

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.

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/block-supports/elements.php

    r58074 r58090  
    1818function wp_get_elements_class_name( $block ) {
    1919    return 'wp-elements-' . md5( serialize( $block ) );
    20 }
    21 
    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;
    3820}
    3921
     
    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
     
    260242 * @param  string $block_content Rendered block content.
    261243 * @param  array  $block         Block object.
    262  *
    263244 * @return string                Filtered block content.
    264245 */
  • trunk/src/wp-includes/deprecated.php

    r57909 r58090  
    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 */
     6317function wp_render_elements_support( $block_content, $block ) {
     6318    _deprecated_function( __FUNCTION__, '6.6.0', 'wp_render_elements_class_name' );
     6319    return $block_content;
     6320}
Note: See TracChangeset for help on using the changeset viewer.