Changeset 50761 for trunk/src/wp-includes/block-supports/align.php
- Timestamp:
- 04/15/2021 02:41:38 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/block-supports/align.php
r49580 r50761 4 4 * 5 5 * @package WordPress 6 * @since 5.6.0 6 7 */ 7 8 … … 9 10 * Registers the align block attribute for block types that support it. 10 11 * 12 * @since 5.6.0 11 13 * @access private 12 14 * … … 14 16 */ 15 17 function 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 ); 20 19 if ( $has_align_support ) { 21 20 if ( ! $block_type->attributes ) { … … 36 35 * This will be applied to the block markup in the front-end. 37 36 * 37 * @since 5.6.0 38 38 * @access private 39 39 * … … 45 45 function wp_apply_alignment_support( $block_type, $block_attributes ) { 46 46 $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 ); 51 48 if ( $has_align_support ) { 52 49 $has_block_alignment = array_key_exists( 'align', $block_attributes );
Note: See TracChangeset
for help on using the changeset viewer.