Changeset 43950
- Timestamp:
- 11/30/2018 01:23:09 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.0/src/wp-includes/blocks/latest-comments.php
r43949 r43950 27 27 * @return string The post title if set; "(no title)" if no title is set. 28 28 */ 29 function gutenberg_draft_or_post_title( $post = 0 ) {29 function wp_latest_comments_draft_or_post_title( $post = 0 ) { 30 30 $title = get_the_title( $post ); 31 31 if ( empty( $title ) ) { … … 43 43 * @return string Returns the post content with latest comments added. 44 44 */ 45 function gutenberg_render_block_core_latest_comments( $attributes = array() ) {45 function render_block_core_latest_comments( $attributes = array() ) { 46 46 // This filter is documented in wp-includes/widgets/class-wp-widget-recent-comments.php. 47 47 $comments = get_comments( … … 95 95 // `_draft_or_post_title` calls `esc_html()` so we don't need to wrap that call in 96 96 // `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>'; 98 98 99 99 $list_items_markup .= sprintf( … … 180 180 ), 181 181 ), 182 'render_callback' => ' gutenberg_render_block_core_latest_comments',182 'render_callback' => 'render_block_core_latest_comments', 183 183 ) 184 184 );
Note: See TracChangeset
for help on using the changeset viewer.