- Timestamp:
- 06/27/2023 02:20:18 PM (16 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/blocks/query-pagination-previous.php
r53157 r56065 20 20 21 21 $wrapper_attributes = get_block_wrapper_attributes(); 22 $show_label = isset( $block->context['showLabel'] ) ? (bool) $block->context['showLabel'] : true; 22 23 $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 : ''; 24 26 $pagination_arrow = get_query_pagination_arrow( $block, false ); 27 if ( ! $label ) { 28 $wrapper_attributes .= ' aria-label="' . $label_text . '"'; 29 } 25 30 if ( $pagination_arrow ) { 26 31 $label = $pagination_arrow . $label; … … 30 35 // and handle appropriately. 31 36 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 ) { 33 38 return $wrapper_attributes; 34 39 };
Note: See TracChangeset
for help on using the changeset viewer.