Changeset 56065 for trunk/src/wp-includes/blocks/query-pagination-next.php
- Timestamp:
- 06/27/2023 02:20:18 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/blocks/query-pagination-next.php
r53157 r56065 21 21 22 22 $wrapper_attributes = get_block_wrapper_attributes(); 23 $show_label = isset( $block->context['showLabel'] ) ? (bool) $block->context['showLabel'] : true; 23 24 $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 : ''; 25 27 $pagination_arrow = get_query_pagination_arrow( $block, true ); 26 28 29 if ( ! $label ) { 30 $wrapper_attributes .= ' aria-label="' . $label_text . '"'; 31 } 27 32 if ( $pagination_arrow ) { 28 33 $label .= $pagination_arrow; … … 32 37 // Check if the pagination is for Query that inherits the global context. 33 38 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 ) { 35 40 return $wrapper_attributes; 36 41 };
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)