Make WordPress Core


Ignore:
Timestamp:
05/10/2022 02:47:10 PM (2 years ago)
Author:
gziolo
Message:

Editor: Update WordPress packages for 6.0 RC 2

Included cherry-picked commits from the Gutenberg plugin that fix bugs discovere after WordPress 6.0 RC 1.

Props zieladam, ndiego, hellofromtonya.
See #55567.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/blocks/latest-posts.php

    r53157 r53377  
    3838
    3939    $args = array(
    40         'posts_per_page'   => $attributes['postsToShow'],
    41         'post_status'      => 'publish',
    42         'order'            => $attributes['order'],
    43         'orderby'          => $attributes['orderBy'],
    44         'suppress_filters' => false,
     40        'posts_per_page'      => $attributes['postsToShow'],
     41        'post_status'         => 'publish',
     42        'order'               => $attributes['order'],
     43        'orderby'             => $attributes['orderBy'],
     44        'ignore_sticky_posts' => true,
     45        'no_found_rows'       => true,
    4546    );
    4647
     
    5556    }
    5657
    57     $recent_posts = get_posts( $args );
     58    $query        = new WP_Query;
     59    $recent_posts = $query->query( $args );
     60
     61    if ( isset( $attributes['displayFeaturedImage'] ) && $attributes['displayFeaturedImage'] ) {
     62        update_post_thumbnail_cache( $query );
     63    }
    5864
    5965    $list_items_markup = '';
Note: See TracChangeset for help on using the changeset viewer.