Make WordPress Core


Ignore:
Timestamp:
12/17/2018 07:05:30 PM (6 years ago)
Author:
desrosj
Message:

Block Editor: Update @wordpress package dependencies.

Update packages include:

  • block-library
  • components
  • edit-post
  • editor
  • format-library
  • list-reusable-blocks
  • nux

Other changes:

  • Fix a translator comment in edit-form-blocks.php.
  • Rename the gutenberg_ functions in blocks/latest-comments.php.

Props noisy socks, youknowriad, pinto, swissspidy.

Merges [43935] and [43949-43951] into trunk.

See #45145.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

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

    r44262 r44273  
    33 * Server-side rendering of the `core/latest-comments` block.
    44 *
    5  * @package gutenberg
     5 * @package WordPress
    66 */
    77
    8 if ( ! function_exists( 'gutenberg_draft_or_post_title' ) ) {
     8if ( ! function_exists( 'wp_latest_comments_draft_or_post_title' ) ) {
    99    /**
    1010     * Get the post title.
     
    2727     * @return string The post title if set; "(no title)" if no title is set.
    2828     */
    29     function gutenberg_draft_or_post_title( $post = 0 ) {
     29    function wp_latest_comments_draft_or_post_title( $post = 0 ) {
    3030        $title = get_the_title( $post );
    3131        if ( empty( $title ) ) {
    32             $title = __( '(no title)', 'default' );
     32            $title = __( '(no title)' );
    3333        }
    3434        return esc_html( $title );
     
    4343 * @return string Returns the post content with latest comments added.
    4444 */
    45 function gutenberg_render_block_core_latest_comments( $attributes = array() ) {
     45function render_block_core_latest_comments( $attributes = array() ) {
    4646    // This filter is documented in wp-includes/widgets/class-wp-widget-recent-comments.php.
    4747    $comments = get_comments(
     
    9595            // `_draft_or_post_title` calls `esc_html()` so we don't need to wrap that call in
    9696            // `esc_html`.
    97             $post_title = '<a class="wp-block-latest-comments__comment-link" href="' . esc_url( get_comment_link( $comment ) ) . '">' . gutenberg_draft_or_post_title( $comment->comment_post_ID ) . '</a>';
     97            $post_title = '<a class="wp-block-latest-comments__comment-link" href="' . esc_url( get_comment_link( $comment ) ) . '">' . wp_latest_comments_draft_or_post_title( $comment->comment_post_ID ) . '</a>';
    9898
    9999            $list_items_markup .= sprintf(
    100100                /* translators: 1: author name (inside <a> or <span> tag, based on if they have a URL), 2: post title related to this comment */
    101                 __( '%1$s on %2$s', 'default' ),
     101                __( '%1$s on %2$s' ),
    102102                $author_markup,
    103103                $post_title
     
    144144        '<div class="%1$s">%2$s</div>',
    145145        $classnames,
    146         __( 'No comments to show.', 'default' )
     146        __( 'No comments to show.' )
    147147    );
    148148
     
    180180            ),
    181181        ),
    182         'render_callback' => 'gutenberg_render_block_core_latest_comments',
     182        'render_callback' => 'render_block_core_latest_comments',
    183183    )
    184184);
Note: See TracChangeset for help on using the changeset viewer.