WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/23/2018 05:34:43 AM (2 years ago)
Author:
pento
Message:

Build: Update the @wordpress/editor package.

The @wordpress/editor wasn't upgraded to the correct version in [43789].

This commit includes changes from the @wordpress/block-library upgrade in [43789], that weren't copied to the correct location in core.

This also regenerates the package-lock.json in Linux, which the build server requires.

See #45145.

File:
1 edited

Legend:

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

    r43752 r43801  
    66 */
    77
    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  */
    28 function gutenberg_draft_or_post_title( $post = 0 ) {
    29     $title = get_the_title( $post );
    30     if ( empty( $title ) ) {
    31         $title = __( '(no title)', 'gutenberg' );
     8if ( ! function_exists( 'gutenberg_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 gutenberg_draft_or_post_title( $post = 0 ) {
     30        $title = get_the_title( $post );
     31        if ( empty( $title ) ) {
     32            $title = __( '(no title)', 'gutenberg' );
     33        }
     34        return esc_html( $title );
    3235    }
    33     return esc_html( $title );
    3436}
    3537
Note: See TracChangeset for help on using the changeset viewer.