Changeset 53157 for trunk/src/wp-includes/blocks/site-title.php
- Timestamp:
- 04/12/2022 03:10:30 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/blocks/site-title.php
r52765 r53157 25 25 26 26 if ( isset( $attributes['level'] ) ) { 27 $tag_name = 0 === $attributes['level'] ? 'p' : 'h' . $attributes['level'];27 $tag_name = 0 === $attributes['level'] ? 'p' : 'h' . (int) $attributes['level']; 28 28 } 29 29 30 30 if ( $attributes['isLink'] ) { 31 31 $link_attrs = array( 32 'href="' . get_bloginfo( 'url') . '"',33 'rel=" home"',32 'href="' . esc_url( get_bloginfo( 'url' ) ) . '"', 33 'rel="' . esc_attr( 'home' ) . '"', 34 34 $aria_current, 35 35 ); … … 37 37 $link_attrs[] = 'target="_blank"'; 38 38 } 39 $site_title = sprintf( '<a %1$s>%2$s</a>', implode( ' ', $link_attrs ), $site_title);39 $site_title = sprintf( '<a %1$s>%2$s</a>', implode( ' ', $link_attrs ), esc_html( $site_title ) ); 40 40 } 41 41 $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $align_class_name ) ); … … 45 45 $tag_name, 46 46 $wrapper_attributes, 47 $site_title 47 // already pre-escaped if it is a link. 48 $attributes['isLink'] ? $site_title : esc_html( $site_title ) 48 49 ); 49 50 }
Note: See TracChangeset
for help on using the changeset viewer.