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/page-list.php

    r52765 r53157  
    179179        }
    180180
    181         $title      = wp_kses( $page['title'], wp_kses_allowed_html( 'post' ) );
     181        $title      = wp_kses_post( $page['title'] );
    182182        $aria_label = sprintf(
    183183            /* translators: Accessibility text. %s: Parent page title. */
     
    186186        );
    187187
    188         $markup .= '<li class="wp-block-pages-list__item' . $css_class . '"' . $style_attribute . '>';
     188        $markup .= '<li class="wp-block-pages-list__item' . esc_attr( $css_class ) . '"' . $style_attribute . '>';
    189189
    190190        if ( isset( $page['children'] ) && $is_navigation_child && $open_submenus_on_click ) {
    191             $markup .= '<button aria-label="' . $aria_label . '" class="' . $navigation_child_content_class . ' wp-block-navigation-submenu__toggle" aria-expanded="false">' . $title . '<span class="wp-block-page-list__submenu-icon wp-block-navigation__submenu-icon"><svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" fill="none" role="img" aria-hidden="true" focusable="false"><path d="M1.50002 4L6.00002 8L10.5 4" stroke-width="1.5"></path></svg></span>' .
    192             '</button>';
     191            $markup .= '<button aria-label="' . esc_attr( $aria_label ) . '" class="' . esc_attr( $navigation_child_content_class ) . ' wp-block-navigation-submenu__toggle" aria-expanded="false">' . esc_html( $title ) .
     192            '</button>' . '<span class="wp-block-page-list__submenu-icon wp-block-navigation__submenu-icon"><svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" fill="none" aria-hidden="true" focusable="false"><path d="M1.50002 4L6.00002 8L10.5 4" stroke-width="1.5"></path></svg></span>';
    193193        } else {
    194             $markup .= '<a class="wp-block-pages-list__item__link' . $navigation_child_content_class . '" href="' . esc_url( $page['link'] ) . '"' . $aria_current . '>' . $title . '</a>';
     194            $markup .= '<a class="wp-block-pages-list__item__link' . esc_attr( $navigation_child_content_class ) . '" href="' . esc_url( $page['link'] ) . '"' . $aria_current . '>' . $title . '</a>';
    195195        }
    196196
    197197        if ( isset( $page['children'] ) ) {
    198198            if ( $is_navigation_child && $show_submenu_icons && ! $open_submenus_on_click ) {
    199                 $markup .= '<button aria-label="' . $aria_label . '" class="wp-block-navigation__submenu-icon wp-block-navigation-submenu__toggle" aria-expanded="false">';
    200                 $markup .= '<span class="wp-block-page-list__submenu-icon wp-block-navigation__submenu-icon"><svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" fill="none" role="img" aria-hidden="true" focusable="false"><path d="M1.50002 4L6.00002 8L10.5 4" stroke-width="1.5"></path></svg></span>';
     199                $markup .= '<button aria-label="' . esc_attr( $aria_label ) . '" class="wp-block-navigation__submenu-icon wp-block-navigation-submenu__toggle" aria-expanded="false">';
     200                $markup .= '<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" fill="none" aria-hidden="true" focusable="false"><path d="M1.50002 4L6.00002 8L10.5 4" stroke-width="1.5"></path></svg>';
    201201                $markup .= '</button>';
    202202            }
     
    236236 * Renders the `core/page-list` block on server.
    237237 *
    238  * @param array $attributes The block attributes.
    239  * @param array $content The saved content.
    240  * @param array $block The parsed block.
     238 * @param array    $attributes The block attributes.
     239 * @param string   $content    The saved content.
     240 * @param WP_Block $block      The parsed block.
    241241 *
    242242 * @return string Returns the page list markup.
     
    253253    );
    254254
    255     // If thare are no pages, there is nothing to show.
     255    // If there are no pages, there is nothing to show.
    256256    if ( empty( $all_pages ) ) {
    257257        return;
Note: See TracChangeset for help on using the changeset viewer.