Make WordPress Core


Ignore:
Timestamp:
04/12/2022 03:10:30 PM (3 years ago)
Author:
gziolo
Message:

Editor: Update WordPress packages based based on Gutenberg v13.0 RC3

This is the last step of backports from the Gutenberg plugin for WordPress 6.0 Beta 1 release. It includes all updates WordPress packages published to npm based on the Gutenberg plugin v13.0 RC3 release. This patch also includes all the necessary changes applied to core blocks. New blocks included:

  • Avatar
  • Comment Author Name
  • Comment Content
  • Comment Date
  • Comment Edit Link
  • Comment Rely Link
  • Comment Template
  • Comments Pagination
  • Comments Pagination Next
  • Comments Pagination Previous
  • Comments Query Loop
  • Home Link
  • Post Author Biography
  • Query No Results
  • Read More

See more details in https://github.com/WordPress/wordpress-develop/pull/2564.

Props zieladam, ramonopoly, ocean90.
Fixes #55505.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/blocks/site-title.php

    r52765 r53157  
    2525
    2626    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'];
    2828    }
    2929
    3030    if ( $attributes['isLink'] ) {
    3131        $link_attrs = array(
    32             'href="' . get_bloginfo( 'url' ) . '"',
    33             'rel="home"',
     32            'href="' . esc_url( get_bloginfo( 'url' ) ) . '"',
     33            'rel="' . esc_attr( 'home' ) . '"',
    3434            $aria_current,
    3535        );
     
    3737            $link_attrs[] = 'target="_blank"';
    3838        }
    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 ) );
    4040    }
    4141    $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $align_class_name ) );
     
    4545        $tag_name,
    4646        $wrapper_attributes,
    47         $site_title
     47        // already pre-escaped if it is a link.
     48        $attributes['isLink'] ? $site_title : esc_html( $site_title )
    4849    );
    4950}
Note: See TracChangeset for help on using the changeset viewer.