Make WordPress Core


Ignore:
Timestamp:
06/27/2023 02:20:18 PM (3 years 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-next.php

    r53157 r56065  
    2121
    2222        $wrapper_attributes = get_block_wrapper_attributes();
     23        $show_label         = isset( $block->context['showLabel'] ) ? (bool) $block->context['showLabel'] : true;
    2324        $default_label      = __( 'Next Page' );
    24         $label              = isset( $attributes['label'] ) && ! empty( $attributes['label'] ) ? esc_html( $attributes['label'] ) : $default_label;
     25        $label_text         = isset( $attributes['label'] ) && ! empty( $attributes['label'] ) ? esc_html( $attributes['label'] ) : $default_label;
     26        $label              = $show_label ? $label_text : '';
    2527        $pagination_arrow   = get_query_pagination_arrow( $block, true );
    2628
     29        if ( ! $label ) {
     30                $wrapper_attributes .= ' aria-label="' . $label_text . '"';
     31        }
    2732        if ( $pagination_arrow ) {
    2833                $label .= $pagination_arrow;
     
    3237        // Check if the pagination is for Query that inherits the global context.
    3338        if ( isset( $block->context['query']['inherit'] ) && $block->context['query']['inherit'] ) {
    34                 $filter_link_attributes = function() use ( $wrapper_attributes ) {
     39                $filter_link_attributes = static function() use ( $wrapper_attributes ) {
    3540                        return $wrapper_attributes;
    3641                };
Note: See TracChangeset for help on using the changeset viewer.