PluginProbe
Gutenberg / 10.1.0
Gutenberg v10.1.0
24.1.0 24.0.0 23.9.1 23.9.0 23.8.0 23.7.2 23.7.1 23.7.0 23.6.1 23.6.2 23.6.0 23.5.3 23.5.2 23.5.1 23.5.0 23.4.0 23.3.2 23.3.1 23.3.0 23.2.0 23.2.1 23.2.2 23.1.1 23.1.0 23.0.1 All 404 releases
← All changes | build/block-library/blocks/latest-comments.php +3 -4 12.6.0 → 10.1.0 View file →
@@ -29,9 +29,9 @@
29 29 $title = get_the_title( $post );
30 30 if ( empty( $title ) ) {
31 31 $title = __( '(no title)' );
32 32 }
33 - return $title;
33 + return esc_html( $title );
34 34 }
35 35
36 36 /**
37 37 * Renders the `core/latest-comments` block on server.
@@ -41,9 +41,9 @@
41 41 * @return string Returns the post content with latest comments added.
42 42 */
43 43 function gutenberg_render_block_core_latest_comments( $attributes = array() ) {
44 44 $comments = get_comments(
45 - /** This filter is documented in wp-includes/widgets/class-wp-widget-recent-comments.php */
45 + // This filter is documented in wp-includes/widgets/class-wp-widget-recent-comments.php.
46 46 apply_filters(
47 47 'widget_comments_args',
48 48 array(
49 49 'number' => $attributes['commentsToShow'],
@@ -48,10 +48,9 @@
48 48 array(
49 49 'number' => $attributes['commentsToShow'],
50 50 'status' => 'approve',
51 51 'post_status' => 'publish',
52 - ),
53 - array()
52 + )
54 53 )
55 54 );
56 55
57 56 $list_items_markup = '';