Version Description
Download this release
Release Info
| Developer | gutenbergplugin |
| Plugin | |
| Version | 12.5.4 |
| Comparing to | |
| See all releases | |
Code changes from version 12.5.3 to 12.5.4
- build/block-library/blocks/comment-date.php +1 -1
- build/block-library/blocks/latest-comments.php +4 -4
- build/block-library/blocks/latest-posts.php +2 -2
- build/block-library/blocks/page-list.php +4 -4
- build/block-library/blocks/post-comments-link.php +2 -2
- build/block-library/blocks/post-date.php +1 -1
- build/block-library/blocks/post-excerpt.php +1 -1
- build/block-library/blocks/post-title.php +1 -1
- build/block-library/blocks/site-tagline.php +1 -1
- build/block-library/blocks/site-title.php +2 -1
- changelog.txt +9 -1
- gutenberg.php +3 -3
- readme.txt +1 -1
build/block-library/blocks/comment-date.php
CHANGED
|
@@ -31,7 +31,7 @@ function gutenberg_render_block_core_comment_date( $attributes, $content, $block
|
|
| 31 |
$link = get_comment_link( $comment );
|
| 32 |
|
| 33 |
if ( ! empty( $attributes['isLink'] ) ) {
|
| 34 |
-
$formatted_date = sprintf( '<a href="%1s">%2s</a>', esc_url( $link ),
|
| 35 |
}
|
| 36 |
|
| 37 |
return sprintf(
|
| 31 |
$link = get_comment_link( $comment );
|
| 32 |
|
| 33 |
if ( ! empty( $attributes['isLink'] ) ) {
|
| 34 |
+
$formatted_date = sprintf( '<a href="%1s">%2s</a>', esc_url( $link ), $formatted_date );
|
| 35 |
}
|
| 36 |
|
| 37 |
return sprintf(
|
build/block-library/blocks/latest-comments.php
CHANGED
|
@@ -86,14 +86,14 @@ function gutenberg_render_block_core_latest_comments( $attributes = array() ) {
|
|
| 86 |
|
| 87 |
$author_markup = '';
|
| 88 |
if ( $author_url ) {
|
| 89 |
-
$author_markup .= '<a class="wp-block-latest-comments__comment-author" href="' . esc_url( $author_url ) . '">' .
|
| 90 |
} else {
|
| 91 |
-
$author_markup .= '<span class="wp-block-latest-comments__comment-author">' .
|
| 92 |
}
|
| 93 |
|
| 94 |
// `_draft_or_post_title` calls `esc_html()` so we don't need to wrap that call in
|
| 95 |
// `esc_html`.
|
| 96 |
-
$post_title = '<a class="wp-block-latest-comments__comment-link" href="' . esc_url( get_comment_link( $comment ) ) . '">' .
|
| 97 |
|
| 98 |
$list_items_markup .= sprintf(
|
| 99 |
/* translators: 1: author name (inside <a> or <span> tag, based on if they have a URL), 2: post title related to this comment */
|
|
@@ -106,7 +106,7 @@ function gutenberg_render_block_core_latest_comments( $attributes = array() ) {
|
|
| 106 |
$list_items_markup .= sprintf(
|
| 107 |
'<time datetime="%1$s" class="wp-block-latest-comments__comment-date">%2$s</time>',
|
| 108 |
esc_attr( get_comment_date( 'c', $comment ) ),
|
| 109 |
-
|
| 110 |
);
|
| 111 |
}
|
| 112 |
$list_items_markup .= '</footer>';
|
| 86 |
|
| 87 |
$author_markup = '';
|
| 88 |
if ( $author_url ) {
|
| 89 |
+
$author_markup .= '<a class="wp-block-latest-comments__comment-author" href="' . esc_url( $author_url ) . '">' . get_comment_author( $comment ) . '</a>';
|
| 90 |
} else {
|
| 91 |
+
$author_markup .= '<span class="wp-block-latest-comments__comment-author">' . get_comment_author( $comment ) . '</span>';
|
| 92 |
}
|
| 93 |
|
| 94 |
// `_draft_or_post_title` calls `esc_html()` so we don't need to wrap that call in
|
| 95 |
// `esc_html`.
|
| 96 |
+
$post_title = '<a class="wp-block-latest-comments__comment-link" href="' . esc_url( get_comment_link( $comment ) ) . '">' . gutenberg_latest_comments_draft_or_post_title( $comment->comment_post_ID ) . '</a>';
|
| 97 |
|
| 98 |
$list_items_markup .= sprintf(
|
| 99 |
/* translators: 1: author name (inside <a> or <span> tag, based on if they have a URL), 2: post title related to this comment */
|
| 106 |
$list_items_markup .= sprintf(
|
| 107 |
'<time datetime="%1$s" class="wp-block-latest-comments__comment-date">%2$s</time>',
|
| 108 |
esc_attr( get_comment_date( 'c', $comment ) ),
|
| 109 |
+
date_i18n( get_option( 'date_format' ), get_comment_date( 'U', $comment ) )
|
| 110 |
);
|
| 111 |
}
|
| 112 |
$list_items_markup .= '</footer>';
|
build/block-library/blocks/latest-posts.php
CHANGED
|
@@ -119,7 +119,7 @@ function gutenberg_render_block_core_latest_posts( $attributes ) {
|
|
| 119 |
if ( ! empty( $author_display_name ) ) {
|
| 120 |
$list_items_markup .= sprintf(
|
| 121 |
'<div class="wp-block-latest-posts__post-author">%1$s</div>',
|
| 122 |
-
|
| 123 |
);
|
| 124 |
}
|
| 125 |
}
|
|
@@ -128,7 +128,7 @@ function gutenberg_render_block_core_latest_posts( $attributes ) {
|
|
| 128 |
$list_items_markup .= sprintf(
|
| 129 |
'<time datetime="%1$s" class="wp-block-latest-posts__post-date">%2$s</time>',
|
| 130 |
esc_attr( get_the_date( 'c', $post ) ),
|
| 131 |
-
|
| 132 |
);
|
| 133 |
}
|
| 134 |
|
| 119 |
if ( ! empty( $author_display_name ) ) {
|
| 120 |
$list_items_markup .= sprintf(
|
| 121 |
'<div class="wp-block-latest-posts__post-author">%1$s</div>',
|
| 122 |
+
$byline
|
| 123 |
);
|
| 124 |
}
|
| 125 |
}
|
| 128 |
$list_items_markup .= sprintf(
|
| 129 |
'<time datetime="%1$s" class="wp-block-latest-posts__post-date">%2$s</time>',
|
| 130 |
esc_attr( get_the_date( 'c', $post ) ),
|
| 131 |
+
get_the_date( '', $post )
|
| 132 |
);
|
| 133 |
}
|
| 134 |
|
build/block-library/blocks/page-list.php
CHANGED
|
@@ -188,10 +188,10 @@ function gutenberg_block_core_page_list_render_nested_page_list( $open_submenus_
|
|
| 188 |
$markup .= '<li class="wp-block-pages-list__item' . esc_attr( $css_class ) . '"' . $style_attribute . '>';
|
| 189 |
|
| 190 |
if ( isset( $page['children'] ) && $is_navigation_child && $open_submenus_on_click ) {
|
| 191 |
-
$markup .= '<button aria-label="' . esc_attr( $aria_label ) . '" class="' . esc_attr( $navigation_child_content_class ) . ' wp-block-navigation-submenu__toggle" aria-expanded="false">' .
|
| 192 |
'</button>';
|
| 193 |
} else {
|
| 194 |
-
$markup .= '<a class="wp-block-pages-list__item__link' . esc_attr( $navigation_child_content_class ) . '" href="' . esc_url( $page['link'] ) . '"' . $aria_current . '>' .
|
| 195 |
}
|
| 196 |
|
| 197 |
if ( isset( $page['children'] ) ) {
|
|
@@ -316,8 +316,8 @@ function gutenberg_render_block_core_page_list( $attributes, $content, $block )
|
|
| 316 |
|
| 317 |
$wrapper_attributes = get_block_wrapper_attributes(
|
| 318 |
array(
|
| 319 |
-
'class' =>
|
| 320 |
-
'style' =>
|
| 321 |
)
|
| 322 |
);
|
| 323 |
|
| 188 |
$markup .= '<li class="wp-block-pages-list__item' . esc_attr( $css_class ) . '"' . $style_attribute . '>';
|
| 189 |
|
| 190 |
if ( isset( $page['children'] ) && $is_navigation_child && $open_submenus_on_click ) {
|
| 191 |
+
$markup .= '<button aria-label="' . esc_attr( $aria_label ) . '" class="' . esc_attr( $navigation_child_content_class ) . ' wp-block-navigation-submenu__toggle" aria-expanded="false">' . $title . '<span class="wp-block-page-list__submenu-icon wp-block-navigation__submenu-icon"><svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" fill="none" role="img" aria-hidden="true" focusable="false"><path d="M1.50002 4L6.00002 8L10.5 4" stroke-width="1.5"></path></svg></span>' .
|
| 192 |
'</button>';
|
| 193 |
} else {
|
| 194 |
+
$markup .= '<a class="wp-block-pages-list__item__link' . esc_attr( $navigation_child_content_class ) . '" href="' . esc_url( $page['link'] ) . '"' . $aria_current . '>' . $title . '</a>';
|
| 195 |
}
|
| 196 |
|
| 197 |
if ( isset( $page['children'] ) ) {
|
| 316 |
|
| 317 |
$wrapper_attributes = get_block_wrapper_attributes(
|
| 318 |
array(
|
| 319 |
+
'class' => $css_classes,
|
| 320 |
+
'style' => $style_attribute,
|
| 321 |
)
|
| 322 |
);
|
| 323 |
|
build/block-library/blocks/post-comments-link.php
CHANGED
|
@@ -33,7 +33,7 @@ function gutenberg_render_block_core_post_comments_link( $attributes, $content,
|
|
| 33 |
$comment_html = sprintf(
|
| 34 |
/* translators: %s post title */
|
| 35 |
__( 'No comments<span class="screen-reader-text"> on %s</span>' ),
|
| 36 |
-
|
| 37 |
);
|
| 38 |
} else {
|
| 39 |
$comment_html = sprintf(
|
|
@@ -44,7 +44,7 @@ function gutenberg_render_block_core_post_comments_link( $attributes, $content,
|
|
| 44 |
$comments_number
|
| 45 |
),
|
| 46 |
esc_html( number_format_i18n( $comments_number ) ),
|
| 47 |
-
|
| 48 |
);
|
| 49 |
}
|
| 50 |
|
| 33 |
$comment_html = sprintf(
|
| 34 |
/* translators: %s post title */
|
| 35 |
__( 'No comments<span class="screen-reader-text"> on %s</span>' ),
|
| 36 |
+
$post_title
|
| 37 |
);
|
| 38 |
} else {
|
| 39 |
$comment_html = sprintf(
|
| 44 |
$comments_number
|
| 45 |
),
|
| 46 |
esc_html( number_format_i18n( $comments_number ) ),
|
| 47 |
+
$post_title
|
| 48 |
);
|
| 49 |
}
|
| 50 |
|
build/block-library/blocks/post-date.php
CHANGED
|
@@ -23,7 +23,7 @@ function gutenberg_render_block_core_post_date( $attributes, $content, $block )
|
|
| 23 |
$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $align_class_name ) );
|
| 24 |
$formatted_date = get_the_date( isset( $attributes['format'] ) ? $attributes['format'] : '', $post_ID );
|
| 25 |
if ( isset( $attributes['isLink'] ) && $attributes['isLink'] ) {
|
| 26 |
-
$formatted_date = sprintf( '<a href="%1s">%2s</a>', get_the_permalink( $post_ID ),
|
| 27 |
}
|
| 28 |
|
| 29 |
return sprintf(
|
| 23 |
$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $align_class_name ) );
|
| 24 |
$formatted_date = get_the_date( isset( $attributes['format'] ) ? $attributes['format'] : '', $post_ID );
|
| 25 |
if ( isset( $attributes['isLink'] ) && $attributes['isLink'] ) {
|
| 26 |
+
$formatted_date = sprintf( '<a href="%1s">%2s</a>', get_the_permalink( $post_ID ), $formatted_date );
|
| 27 |
}
|
| 28 |
|
| 29 |
return sprintf(
|
build/block-library/blocks/post-excerpt.php
CHANGED
|
@@ -24,7 +24,7 @@ function gutenberg_render_block_core_post_excerpt( $attributes, $content, $block
|
|
| 24 |
return '';
|
| 25 |
}
|
| 26 |
|
| 27 |
-
$more_text = ! empty( $attributes['moreText'] ) ? '<a class="wp-block-post-excerpt__more-link" href="' . esc_url( get_the_permalink( $block->context['postId'] ) ) . '">' .
|
| 28 |
$filter_excerpt_more = function( $more ) use ( $more_text ) {
|
| 29 |
return empty( $more_text ) ? $more : '';
|
| 30 |
};
|
| 24 |
return '';
|
| 25 |
}
|
| 26 |
|
| 27 |
+
$more_text = ! empty( $attributes['moreText'] ) ? '<a class="wp-block-post-excerpt__more-link" href="' . esc_url( get_the_permalink( $block->context['postId'] ) ) . '">' . wp_kses_post( $attributes['moreText'] ) . '</a>' : '';
|
| 28 |
$filter_excerpt_more = function( $more ) use ( $more_text ) {
|
| 29 |
return empty( $more_text ) ? $more : '';
|
| 30 |
};
|
build/block-library/blocks/post-title.php
CHANGED
|
@@ -34,7 +34,7 @@ function gutenberg_render_block_core_post_title( $attributes, $content, $block )
|
|
| 34 |
}
|
| 35 |
|
| 36 |
if ( isset( $attributes['isLink'] ) && $attributes['isLink'] ) {
|
| 37 |
-
$title = sprintf( '<a href="%1$s" target="%2$s" rel="%3$s">%4$s</a>', get_the_permalink( $post_ID ), esc_attr( $attributes['linkTarget'] ), esc_attr( $attributes['rel'] ),
|
| 38 |
}
|
| 39 |
$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $align_class_name ) );
|
| 40 |
|
| 34 |
}
|
| 35 |
|
| 36 |
if ( isset( $attributes['isLink'] ) && $attributes['isLink'] ) {
|
| 37 |
+
$title = sprintf( '<a href="%1$s" target="%2$s" rel="%3$s">%4$s</a>', get_the_permalink( $post_ID ), esc_attr( $attributes['linkTarget'] ), esc_attr( $attributes['rel'] ), $title );
|
| 38 |
}
|
| 39 |
$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $align_class_name ) );
|
| 40 |
|
build/block-library/blocks/site-tagline.php
CHANGED
|
@@ -23,7 +23,7 @@ function gutenberg_render_block_core_site_tagline( $attributes ) {
|
|
| 23 |
return sprintf(
|
| 24 |
'<p %1$s>%2$s</p>',
|
| 25 |
$wrapper_attributes,
|
| 26 |
-
|
| 27 |
);
|
| 28 |
}
|
| 29 |
|
| 23 |
return sprintf(
|
| 24 |
'<p %1$s>%2$s</p>',
|
| 25 |
$wrapper_attributes,
|
| 26 |
+
$site_tagline
|
| 27 |
);
|
| 28 |
}
|
| 29 |
|
build/block-library/blocks/site-title.php
CHANGED
|
@@ -44,7 +44,8 @@ function gutenberg_render_block_core_site_title( $attributes ) {
|
|
| 44 |
'<%1$s %2$s>%3$s</%1$s>',
|
| 45 |
$tag_name,
|
| 46 |
$wrapper_attributes,
|
| 47 |
-
|
|
|
|
| 48 |
);
|
| 49 |
}
|
| 50 |
|
| 44 |
'<%1$s %2$s>%3$s</%1$s>',
|
| 45 |
$tag_name,
|
| 46 |
$wrapper_attributes,
|
| 47 |
+
// already pre-escaped if it is a link.
|
| 48 |
+
$attributes['isLink'] ? $site_title : esc_html( $site_title )
|
| 49 |
);
|
| 50 |
}
|
| 51 |
|
changelog.txt
CHANGED
|
@@ -1,10 +1,18 @@
|
|
| 1 |
== Changelog ==
|
| 2 |
|
| 3 |
-
= 12.5.
|
| 4 |
|
| 5 |
### Bug Fixes
|
| 6 |
|
| 7 |
#### Block Library
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
- Fix escaping to consider addition of pagination arrow in Query Loop. ([38519](https://github.com/WordPress/gutenberg/pull/38519))
|
| 9 |
|
| 10 |
|
| 1 |
== Changelog ==
|
| 2 |
|
| 3 |
+
= 12.5.4 =
|
| 4 |
|
| 5 |
### Bug Fixes
|
| 6 |
|
| 7 |
#### Block Library
|
| 8 |
+
- Fix and refine core function escaping in block output. ([38569](https://github.com/WordPress/gutenberg/pull/38569))
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
= 12.5.3 =
|
| 12 |
+
|
| 13 |
+
### Bug Fixes
|
| 14 |
+
|
| 15 |
+
#### Block Library
|
| 16 |
- Fix escaping to consider addition of pagination arrow in Query Loop. ([38519](https://github.com/WordPress/gutenberg/pull/38519))
|
| 17 |
|
| 18 |
|
gutenberg.php
CHANGED
|
@@ -5,7 +5,7 @@
|
|
| 5 |
* Description: Printing since 1440. This is the development plugin for the new block editor in core.
|
| 6 |
* Requires at least: 5.7
|
| 7 |
* Requires PHP: 5.6
|
| 8 |
-
* Version: 12.5.
|
| 9 |
* Author: Gutenberg Team
|
| 10 |
* Text Domain: gutenberg
|
| 11 |
*
|
|
@@ -13,8 +13,8 @@
|
|
| 13 |
*/
|
| 14 |
|
| 15 |
### BEGIN AUTO-GENERATED DEFINES
|
| 16 |
-
define( 'GUTENBERG_VERSION', '12.5.
|
| 17 |
-
define( 'GUTENBERG_GIT_COMMIT', '
|
| 18 |
### END AUTO-GENERATED DEFINES
|
| 19 |
|
| 20 |
gutenberg_pre_init();
|
| 5 |
* Description: Printing since 1440. This is the development plugin for the new block editor in core.
|
| 6 |
* Requires at least: 5.7
|
| 7 |
* Requires PHP: 5.6
|
| 8 |
+
* Version: 12.5.4
|
| 9 |
* Author: Gutenberg Team
|
| 10 |
* Text Domain: gutenberg
|
| 11 |
*
|
| 13 |
*/
|
| 14 |
|
| 15 |
### BEGIN AUTO-GENERATED DEFINES
|
| 16 |
+
define( 'GUTENBERG_VERSION', '12.5.4' );
|
| 17 |
+
define( 'GUTENBERG_GIT_COMMIT', '9c6431a3245e0b979dff04028d4c99a4246fde45' );
|
| 18 |
### END AUTO-GENERATED DEFINES
|
| 19 |
|
| 20 |
gutenberg_pre_init();
|
readme.txt
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
=== Gutenberg ===
|
| 2 |
Contributors: matveb, joen, karmatosed
|
| 3 |
Tested up to: 5.9
|
| 4 |
-
Stable tag: 12.5.
|
| 5 |
License: GPLv2 or later
|
| 6 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 7 |
|
| 1 |
=== Gutenberg ===
|
| 2 |
Contributors: matveb, joen, karmatosed
|
| 3 |
Tested up to: 5.9
|
| 4 |
+
Stable tag: 12.5.3
|
| 5 |
License: GPLv2 or later
|
| 6 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 7 |
|
