Make WordPress Core


Ignore:
Timestamp:
12/14/2018 12:19:57 PM (6 years ago)
Author:
youknowriad
Message:

Block Editor: Upgrade @wordpress packages to the latest version (4.7).

Updated packages:

  • @wordpress/annotations@1.0.4
  • @wordpress/api-fetch@2.2.6
  • @wordpress/block-library@2.2.10
  • @wordpress/block-serialization-default-parser@2.0.2
  • @wordpress/block-serialization-spec-parser@2.0.2
  • @wordpress/blocks@6.0.4
  • @wordpress/components@7.0.4
  • @wordpress/core-data@2.0.15
  • @wordpress/data@4.1.0
  • @wordpress/date@3.0.1
  • @wordpress/edit-post@3.1.5
  • @wordpress/editor@9.0.5
  • @wordpress/eslint-plugin@1.0.0
  • @wordpress/format-library@1.2.8
  • @wordpress/html-entities@2.0.4
  • @wordpress/list-reusable-blocks@1.1.17
  • @wordpress/notices@1.1.1
  • @wordpress/nux@3.0.5
  • @wordpress/rich-text@3.0.3
  • @wordpress/url@2.3.2
  • @wordpress/viewport@2.0.13

This also includes the updates the Core blocks.
The script loader is updated to match the Gutenberg repository too.

Props atimmer, gziolo, joen.
Fixes #45442, #45637.

File:
1 edited

Legend:

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

    r43951 r44183  
    66 */
    77
    8 if ( ! function_exists( 'wp_latest_comments_draft_or_post_title' ) ) {
    9     /**
    10      * Get the post title.
    11      *
    12      * The post title is fetched and if it is blank then a default string is
    13      * returned.
    14      *
    15      * Copied from `wp-admin/includes/template.php`, but we can't include that
    16      * file because:
    17      *
    18      * 1. It causes bugs with test fixture generation and strange Docker 255 error
    19      *    codes.
    20      * 2. It's in the admin; ideally we *shouldn't* be including files from the
    21      *    admin for a block's output. It's a very small/simple function as well,
    22      *    so duplicating it isn't too terrible.
    23      *
    24      * @since 3.3.0
    25      *
    26      * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global $post.
    27      * @return string The post title if set; "(no title)" if no title is set.
    28      */
    29     function wp_latest_comments_draft_or_post_title( $post = 0 ) {
    30         $title = get_the_title( $post );
    31         if ( empty( $title ) ) {
    32             $title = __( '(no title)' );
    33         }
    34         return esc_html( $title );
     8/**
     9 * Get the post title.
     10 *
     11 * The post title is fetched and if it is blank then a default string is
     12 * returned.
     13 *
     14 * Copied from `wp-admin/includes/template.php`, but we can't include that
     15 * file because:
     16 *
     17 * 1. It causes bugs with test fixture generation and strange Docker 255 error
     18 *    codes.
     19 * 2. It's in the admin; ideally we *shouldn't* be including files from the
     20 *    admin for a block's output. It's a very small/simple function as well,
     21 *    so duplicating it isn't too terrible.
     22 *
     23 * @since 3.3.0
     24 *
     25 * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global $post.
     26 * @return string The post title if set; "(no title)" if no title is set.
     27 */
     28function wp_latest_comments_draft_or_post_title( $post = 0 ) {
     29    $title = get_the_title( $post );
     30    if ( empty( $title ) ) {
     31        $title = __( '(no title)' );
    3532    }
     33    return esc_html( $title );
    3634}
    3735
Note: See TracChangeset for help on using the changeset viewer.