Make WordPress Core


Ignore:
Timestamp:
11/08/2021 02:26:27 PM (3 years ago)
Author:
youknowriad
Message:

Block Editor: Update the WordPress Packages based on Gutenberg 11.9 RC1.

This brings the JS packages up to date and is the first step that will allow us
to include the other block editor updates for WordPress 5.9:
FSE infrastrucutre, site editor and global styles.

Props noisysocks.
See #54337.

File:
1 edited

Legend:

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

    r51051 r52042  
    4646            'prev_next' => false,
    4747        );
     48        if ( 1 !== $page ) {
     49            /**
     50             * `paginate_links` doesn't use the provided `format` when the page is `1`.
     51             * This is great for the main query as it removes the extra query params
     52             * making the URL shorter, but in the case of multiple custom queries is
     53             * problematic. It results in returning an empty link which ends up with
     54             * a link to the current page.
     55             *
     56             * A way to address this is to add a `fake` query arg with no value that
     57             * is the same for all custom queries. This way the link is not empty and
     58             * preserves all the other existent query args.
     59             *
     60             * @see https://developer.wordpress.org/reference/functions/paginate_links/
     61             *
     62             * The proper fix of this should be in core. Track Ticket:
     63             * @see https://core.trac.wordpress.org/ticket/53868
     64             *
     65             * TODO: After two WP versions (starting from the WP version the core patch landed),
     66             * we should remove this and call `paginate_links` with the proper new arg.
     67             */
     68            $paginate_args['add_args'] = array( 'cst' => '' );
     69        }
    4870        // We still need to preserve `paged` query param if exists, as is used
    4971        // for Queries that inherit from global context.
Note: See TracChangeset for help on using the changeset viewer.