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/custom-classname.php

    r49580 r50761  
    44 *
    55 * @package WordPress
     6 * @since 5.6.0
    67 */
    78
     
    910 * Registers the custom classname block attribute for block types that support it.
    1011 *
     12 * @since 5.6.0
    1113 * @access private
    1214 *
     
    1416 */
    1517function wp_register_custom_classname_support( $block_type ) {
    16     $has_custom_classname_support = true;
    17     if ( property_exists( $block_type, 'supports' ) ) {
    18         $has_custom_classname_support = _wp_array_get( $block_type->supports, array( 'customClassName' ), true );
    19     }
     18    $has_custom_classname_support = block_has_support( $block_type, array( 'customClassName' ), true );
     19
    2020    if ( $has_custom_classname_support ) {
    2121        if ( ! $block_type->attributes ) {
     
    3434 * Add the custom classnames to the output.
    3535 *
     36 * @since 5.6.0
    3637 * @access private
    3738 *
     
    4243 */
    4344function wp_apply_custom_classname_support( $block_type, $block_attributes ) {
    44     $has_custom_classname_support = true;
     45    $has_custom_classname_support = block_has_support( $block_type, array( 'customClassName' ), true );
    4546    $attributes                   = array();
    46     if ( property_exists( $block_type, 'supports' ) ) {
    47         $has_custom_classname_support = _wp_array_get( $block_type->supports, array( 'customClassName' ), true );
    48     }
    4947    if ( $has_custom_classname_support ) {
    5048        $has_custom_classnames = array_key_exists( 'className', $block_attributes );
Note: See TracChangeset for help on using the changeset viewer.