Make WordPress Core


Ignore:
Timestamp:
02/13/2024 01:10:05 PM (5 months ago)
Author:
youknowriad
Message:

Editor: Update Packages with the latest bug fixes for 6.5 beta1.

It includes all the backports from this Gutenberg PR https://github.com/WordPress/gutenberg/pull/58964

Props youknowriad, get_dave.
See #60315.

File:
1 edited

Legend:

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

    r57377 r57619  
    9292
    9393    if ( $enhanced_pagination ) {
    94         $p = new WP_HTML_Tag_Processor( $content );
     94        $p         = new WP_HTML_Tag_Processor( $content );
     95        $tag_index = 0;
    9596        while ( $p->next_tag(
    96             array(
    97                 'tag_name'   => 'a',
    98                 'class_name' => 'page-numbers',
    99             )
     97            array( 'class_name' => 'page-numbers' )
    10098        ) ) {
    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            }
    102105        }
    103106        $content = $p->get_updated_html();
Note: See TracChangeset for help on using the changeset viewer.