WordPress.org

Make WordPress Core


Ignore:
Timestamp:
03/07/2019 09:08:38 AM (21 months ago)
Author:
youknowriad
Message:

Block Editor: Update the WordPress Packages from Gutenberg 5.2.

Updated Packages:

  • @wordpress/a11y@2.1.0
  • @wordpress/annotations@1.1.0
  • @wordpress/api-fetch@3.0.0
  • @wordpress/autop@2.1.0
  • @wordpress/babel-plugin-import-jsx-pragma@2.0.0
  • @wordpress/babel-plugin-makepot@3.0.0
  • @wordpress/babel-preset-default@4.0.0
  • @wordpress/blob@2.2.0
  • @wordpress/block-editor@1.0.0
  • @wordpress/block-library@2.3.0
  • @wordpress/block-serialization-default-parser@3.0.0
  • @wordpress/block-serialization-spec-parser@3.0.0
  • @wordpress/blocks@6.1.0
  • @wordpress/browserslist-config@2.3.0
  • @wordpress/components@7.1.0
  • @wordpress/compose@3.1.0
  • @wordpress/core-data@2.1.0
  • @wordpress/custom-templated-path-webpack-plugin@1.2.0
  • @wordpress/data@4.3.0
  • @wordpress/date@3.1.0
  • @wordpress/deprecated@2.1.0
  • @wordpress/docgen@1.0.0
  • @wordpress/dom-ready@2.1.0
  • @wordpress/dom@2.1.0
  • @wordpress/e2e-test-utils@1.0.0
  • @wordpress/e2e-tests@1.0.0
  • @wordpress/edit-post@3.2.0
  • @wordpress/editor@9.1.0
  • @wordpress/element@2.2.0
  • @wordpress/escape-html@1.1.0
  • @wordpress/eslint-plugin@2.0.0
  • @wordpress/format-library@1.3.0
  • @wordpress/hooks@2.1.0
  • @wordpress/html-entities@2.1.0
  • @wordpress/i18n@3.2.0
  • @wordpress/is-shallow-equal@1.2.0
  • @wordpress/jest-console@3.0.0
  • @wordpress/jest-preset-default@4.0.0
  • @wordpress/jest-puppeteer-axe@1.0.0
  • @wordpress/keycodes@2.1.0
  • @wordpress/library-export-default-webpack-plugin@1.1.0
  • @wordpress/list-reusable-blocks@1.2.0
  • @wordpress/notices@1.2.0
  • @wordpress/npm-package-json-lint-config@1.2.0
  • @wordpress/nux@3.1.0
  • @wordpress/plugins@2.1.0
  • @wordpress/postcss-themes@2.0.0
  • @wordpress/priority-queue@1.0.0
  • @wordpress/redux-routine@3.1.0
  • @wordpress/rich-text@3.1.0
  • @wordpress/scripts@3.0.0
  • @wordpress/shortcode@2.1.0
  • @wordpress/token-list@1.2.0
  • @wordpress/url@2.4.0
  • @wordpress/viewport@2.2.0
  • @wordpress/wordcount@2.1.0

This also includes the update to the scripts dependencies and the new widgets php files.

Props iseulde.
Fixes #46429.

File:
1 edited

Legend:

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

    r44273 r44808  
    1515function render_block_core_latest_posts( $attributes ) {
    1616    $args = array(
    17         'numberposts' => $attributes['postsToShow'],
    18         'post_status' => 'publish',
    19         'order'       => $attributes['order'],
    20         'orderby'     => $attributes['orderBy'],
     17        'posts_per_page'   => $attributes['postsToShow'],
     18        'post_status'      => 'publish',
     19        'order'            => $attributes['order'],
     20        'orderby'          => $attributes['orderBy'],
     21        'suppress_filters' => false,
    2122    );
    2223
     
    2526    }
    2627
    27     $recent_posts = wp_get_recent_posts( $args );
     28    $recent_posts = get_posts( $args );
    2829
    2930    $list_items_markup = '';
    3031
    3132    foreach ( $recent_posts as $post ) {
    32         $post_id = $post['ID'];
    33 
    34         $title = get_the_title( $post_id );
     33        $title = get_the_title( $post );
    3534        if ( ! $title ) {
    3635            $title = __( '(Untitled)' );
     
    3837        $list_items_markup .= sprintf(
    3938            '<li><a href="%1$s">%2$s</a>',
    40             esc_url( get_permalink( $post_id ) ),
    41             esc_html( $title )
     39            esc_url( get_permalink( $post ) ),
     40            $title
    4241        );
    4342
     
    4544            $list_items_markup .= sprintf(
    4645                '<time datetime="%1$s" class="wp-block-latest-posts__post-date">%2$s</time>',
    47                 esc_attr( get_the_date( 'c', $post_id ) ),
    48                 esc_html( get_the_date( '', $post_id ) )
     46                esc_attr( get_the_date( 'c', $post ) ),
     47                esc_html( get_the_date( '', $post ) )
    4948            );
    5049        }
Note: See TracChangeset for help on using the changeset viewer.