Make WordPress Core


Ignore:
Timestamp:
04/15/2021 02:41:38 PM (3 years ago)
Author:
gziolo
Message:

Editor: Update WordPress packages to use with WordPress 5.8

In the response to the discussion during the Dev Chat, I'm doing a first pass to keep WordPress packages up to date in the WordPress 5.8 release cycle.

See https://github.com/WordPress/wordpress-develop/pull/1176 for more details.

Props youknowriad, aristath, andraganescu.
See #52991.

File:
1 edited

Legend:

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

    r49787 r50761  
    44 *
    55 * @package WordPress
     6 * @since 5.6.0
    67 */
    78
     
    4647 *
    4748 * @param  WP_Block_Type $block_type       Block Type.
    48  * @param  array         $block_attributes Block attributes.
    4949 *
    5050 * @return array Block CSS classes and inline styles.
    5151 */
    52 function wp_apply_generated_classname_support( $block_type, $block_attributes ) {
    53     $has_generated_classname_support = true;
     52function wp_apply_generated_classname_support( $block_type ) {
    5453    $attributes                      = array();
    55     if ( property_exists( $block_type, 'supports' ) ) {
    56         $has_generated_classname_support = _wp_array_get( $block_type->supports, array( 'className' ), true );
    57     }
     54    $has_generated_classname_support = block_has_support( $block_type, array( 'className' ), true );
    5855    if ( $has_generated_classname_support ) {
    5956        $block_classname = wp_get_block_default_classname( $block_type->name );
Note: See TracChangeset for help on using the changeset viewer.