Make WordPress Core


Ignore:
Timestamp:
01/11/2022 03:11:06 AM (2 years ago)
Author:
noisysocks
Message:

Update packages to include these bug fixes from Gutenberg:

  • [Block Library - Query Pagination Next]: Hide block if custom query has no results
  • [WP 5.9] Fix: HTML tags like inline images in nav links break submenu layout
  • Check for nextpage to display page links for paginated posts
  • Navigation: Set the default for --navigation-layout-align to "flex-start" when using vertical orientation
  • [Block Library - Query Loop]: Use gap for the grid view
  • Update page list flex variables to match navigation.
  • Site logo: Fix range control on landscape logo
  • Restore canvas padding for classic themes
  • RichText: Fix dead key input on Windows
  • Fix: Impossible to clear colors if color palettes are removed.
  • Gallery block: pass any custom attributes through the gallery v2 migration script
  • Reduce specificity of legacy font sizes defined by core
  • Update: Improve escaping on the search block

See #54487.
Props isabel_brison.

File:
1 edited

Legend:

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

    r52042 r52551  
    4444        remove_filter( 'next_posts_link_attributes', $filter_link_attributes );
    4545    } elseif ( ! $max_page || $max_page > $page ) {
    46         $custom_query = new WP_Query( build_query_vars_from_query_block( $block, $page ) );
    47         if ( (int) $custom_query->max_num_pages !== $page ) {
     46        $custom_query           = new WP_Query( build_query_vars_from_query_block( $block, $page ) );
     47        $custom_query_max_pages = (int) $custom_query->max_num_pages;
     48        if ( $custom_query_max_pages && $custom_query_max_pages !== $page ) {
    4849            $content = sprintf(
    4950                '<a href="%1$s" %2$s>%3$s</a>',
Note: See TracChangeset for help on using the changeset viewer.