Make WordPress Core


Ignore:
Timestamp:
11/21/2018 03:08:01 PM (6 years ago)
Author:
danielbachhuber
Message:

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

Updates packages: annotations,
api-fetch,
block-library,
blocks,
components,
core-data,
data,
dom, edit-post,
editor,
format-library,
jest-console,
jest-preset-default,
keycodes,
html-entities,
list-reusable-blocks,
notices,
nux,
rich-text,
scripts,
token-list, url,
viewport

Fixes undefined notices in some blocks. Removes incorrect 'gutenberg' textdomain too.

See #45145

File:
1 edited

Legend:

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

    r43840 r43919  
    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)' );
    3437        }
    3538        $list_items_markup .= sprintf(
Note: See TracChangeset for help on using the changeset viewer.