wp/wp-includes/block-supports/align.php
changeset 19 3d72ae0968f4
parent 18 be944660c56a
child 21 48c4eec2b7e6
equal deleted inserted replaced
18:be944660c56a 19:3d72ae0968f4
    29 		}
    29 		}
    30 	}
    30 	}
    31 }
    31 }
    32 
    32 
    33 /**
    33 /**
    34  * Add CSS classes for block alignment to the incoming attributes array.
    34  * Adds CSS classes for block alignment to the incoming attributes array.
    35  * This will be applied to the block markup in the front-end.
    35  * This will be applied to the block markup in the front-end.
    36  *
    36  *
    37  * @since 5.6.0
    37  * @since 5.6.0
    38  * @access private
    38  * @access private
    39  *
    39  *
    40  * @param WP_Block_Type $block_type       Block Type.
    40  * @param WP_Block_Type $block_type       Block Type.
    41  * @param array         $block_attributes Block attributes.
    41  * @param array         $block_attributes Block attributes.
    42  *
       
    43  * @return array Block alignment CSS classes and inline styles.
    42  * @return array Block alignment CSS classes and inline styles.
    44  */
    43  */
    45 function wp_apply_alignment_support( $block_type, $block_attributes ) {
    44 function wp_apply_alignment_support( $block_type, $block_attributes ) {
    46 	$attributes        = array();
    45 	$attributes        = array();
    47 	$has_align_support = block_has_support( $block_type, array( 'align' ), false );
    46 	$has_align_support = block_has_support( $block_type, array( 'align' ), false );