Changeset 58187 for trunk/src/wp-includes/blocks/site-tagline.php
- Timestamp:
- 05/23/2024 07:37:08 PM (19 months ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/blocks/site-tagline.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/blocks/site-tagline.php
r51199 r58187 9 9 * Renders the `core/site-tagline` block on the server. 10 10 * 11 * @since 5.8.0 12 * 11 13 * @param array $attributes The block attributes. 12 14 * … … 18 20 return; 19 21 } 22 23 $tag_name = 'p'; 20 24 $align_class_name = empty( $attributes['textAlign'] ) ? '' : "has-text-align-{$attributes['textAlign']}"; 21 25 $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $align_class_name ) ); 22 26 27 if ( isset( $attributes['level'] ) && 0 !== $attributes['level'] ) { 28 $tag_name = 'h' . (int) $attributes['level']; 29 } 30 23 31 return sprintf( 24 '<p %1$s>%2$s</p>', 32 '<%1$s %2$s>%3$s</%1$s>', 33 $tag_name, 25 34 $wrapper_attributes, 26 35 $site_tagline … … 30 39 /** 31 40 * Registers the `core/site-tagline` block on the server. 41 * 42 * @since 5.8.0 32 43 */ 33 44 function register_block_core_site_tagline() { … … 39 50 ); 40 51 } 52 41 53 add_action( 'init', 'register_block_core_site_tagline' );
Note: See TracChangeset
for help on using the changeset viewer.