Make WordPress Core


Ignore:
Timestamp:
06/27/2023 02:20:18 PM (16 months ago)
Author:
Bernhard Reiter
Message:

Editor: update Wordpress npm packages.

Updates the wordpress npm packages and their dependencies to the latest versions, as well as auto-updates to relevant core PHP files.

Props youknowriad, joemcgill, spacedmonkey, ramonopoly, peterwilsoncc, bernhard-reiter, tyxla, dmsnell.
Fixes #58623.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/blocks/query-pagination-previous.php

    r53157 r56065  
    2020
    2121    $wrapper_attributes = get_block_wrapper_attributes();
     22    $show_label         = isset( $block->context['showLabel'] ) ? (bool) $block->context['showLabel'] : true;
    2223    $default_label      = __( 'Previous Page' );
    23     $label              = isset( $attributes['label'] ) && ! empty( $attributes['label'] ) ? esc_html( $attributes['label'] ) : $default_label;
     24    $label_text         = isset( $attributes['label'] ) && ! empty( $attributes['label'] ) ? esc_html( $attributes['label'] ) : $default_label;
     25    $label              = $show_label ? $label_text : '';
    2426    $pagination_arrow   = get_query_pagination_arrow( $block, false );
     27    if ( ! $label ) {
     28        $wrapper_attributes .= ' aria-label="' . $label_text . '"';
     29    }
    2530    if ( $pagination_arrow ) {
    2631        $label = $pagination_arrow . $label;
     
    3035    // and handle appropriately.
    3136    if ( isset( $block->context['query']['inherit'] ) && $block->context['query']['inherit'] ) {
    32         $filter_link_attributes = function() use ( $wrapper_attributes ) {
     37        $filter_link_attributes = static function() use ( $wrapper_attributes ) {
    3338            return $wrapper_attributes;
    3439        };
Note: See TracChangeset for help on using the changeset viewer.