Make WordPress Core


Ignore:
Timestamp:
12/17/2018 03:35:21 PM (8 years ago)
Author:
desrosj
Message:

Block Editor: Update @wordpress dependencies to match Gutenberg 4.5.1.

  • Update the annotations, api-fetch, block-library, blocks, components, compose, core-data, data, date, dom, edit-post, editor, element, format-library, html-entities, i18n, jest-console, jest-preset-default, keycodes, list-reusable-blocks, notices, nux, plugins, rich-text, scripts, token-lists, url, viewport packages.
  • Upgrades React from 16.5.2 to 16.6.3.
  • Adds a missing wp-date dependency to the editor script.
  • Updates changed dependencies in script-loader.php.
  • Fixes undefined notices in some blocks.
  • Removes incorrect gutenberg textdomain.

Merges [43891], [43903], and [43919] to trunk.

Props atimmer, aduth, youknowriad, danielbachhuber.
See #45145.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

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

    r44177 r44262  
    1414 */
    1515function render_block_core_latest_posts( $attributes ) {
    16         $recent_posts = wp_get_recent_posts(
    17                 array(
    18                         'numberposts' => $attributes['postsToShow'],
    19                         'post_status' => 'publish',
    20                         'order'       => $attributes['order'],
    21                         'orderby'     => $attributes['orderBy'],
    22                         'category'    => $attributes['categories'],
    23                 )
     16        $args = array(
     17                'numberposts' => $attributes['postsToShow'],
     18                'post_status' => 'publish',
     19                'order'       => $attributes['order'],
     20                'orderby'     => $attributes['orderBy'],
    2421        );
     22
     23        if ( isset( $attributes['categories'] ) ) {
     24                $args['categories'] = $attributes['categories'];
     25        }
     26
     27        $recent_posts = wp_get_recent_posts( $args );
    2528
    2629        $list_items_markup = '';
    … …  
    3134                $title = get_the_title( $post_id );
    3235                if ( ! $title ) {
    33                         $title = __( '(Untitled)', 'gutenberg' );
     36                        $title = __( '(Untitled)', 'default' );
    3437                }
    3538                $list_items_markup .= sprintf(
Note: See TracChangeset for help on using the changeset viewer.