- Timestamp:
- 02/13/2024 01:10:05 PM (9 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/blocks/query-pagination-numbers.php
r57377 r57619 92 92 93 93 if ( $enhanced_pagination ) { 94 $p = new WP_HTML_Tag_Processor( $content ); 94 $p = new WP_HTML_Tag_Processor( $content ); 95 $tag_index = 0; 95 96 while ( $p->next_tag( 96 array( 97 'tag_name' => 'a', 98 'class_name' => 'page-numbers', 99 ) 97 array( 'class_name' => 'page-numbers' ) 100 98 ) ) { 101 $p->set_attribute( 'data-wp-on--click', 'core/query::actions.navigate' ); 99 if ( null === $p->get_attribute( 'data-wp-key' ) ) { 100 $p->set_attribute( 'data-wp-key', 'index-' . $tag_index++ ); 101 } 102 if ( 'A' === $p->get_tag() ) { 103 $p->set_attribute( 'data-wp-on--click', 'core/query::actions.navigate' ); 104 } 102 105 } 103 106 $content = $p->get_updated_html();
Note: See TracChangeset
for help on using the changeset viewer.