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/align.php

    r49580 r50761  
    44 *
    55 * @package WordPress
     6 * @since 5.6.0
    67 */
    78
     
    910 * Registers the align block attribute for block types that support it.
    1011 *
     12 * @since 5.6.0
    1113 * @access private
    1214 *
     
    1416 */
    1517function wp_register_alignment_support( $block_type ) {
    16     $has_align_support = false;
    17     if ( property_exists( $block_type, 'supports' ) ) {
    18         $has_align_support = _wp_array_get( $block_type->supports, array( 'align' ), false );
    19     }
     18    $has_align_support = block_has_support( $block_type, array( 'align' ), false );
    2019    if ( $has_align_support ) {
    2120        if ( ! $block_type->attributes ) {
     
    3635 * This will be applied to the block markup in the front-end.
    3736 *
     37 * @since 5.6.0
    3838 * @access private
    3939 *
     
    4545function wp_apply_alignment_support( $block_type, $block_attributes ) {
    4646    $attributes        = array();
    47     $has_align_support = false;
    48     if ( property_exists( $block_type, 'supports' ) ) {
    49         $has_align_support = _wp_array_get( $block_type->supports, array( 'align' ), false );
    50     }
     47    $has_align_support = block_has_support( $block_type, array( 'align' ), false );
    5148    if ( $has_align_support ) {
    5249        $has_block_alignment = array_key_exists( 'align', $block_attributes );
Note: See TracChangeset for help on using the changeset viewer.