PluginProbe
Gutenberg / 24.1.0
Gutenberg v24.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/scripts/block-library/post-author-name.php +4 -4 23.3.0 → 24.1.0 View file →
@@ -9,11 +9,11 @@
9 9 * Renders the `core/post-author-name` block on the server.
10 10 *
11 11 * @since 6.2.0
12 12 *
13 - * @param array $attributes Block attributes.
14 - * @param string $content Block default content.
15 - * @param WP_Block $block Block instance.
13 + * @param array $attributes Block attributes.
14 + * @param string $content Block default content.
15 + * @param WP_Block $block Block instance.
16 16 * @return string Returns the rendered post author name block.
17 17 */
18 18 function gutenberg_render_block_core_post_author_name( $attributes, $content, $block ) {
19 19 if ( isset( $block->context['postId'] ) ) {
@@ -31,9 +31,9 @@
31 31 }
32 32
33 33 $author_name = get_the_author_meta( 'display_name', $author_id );
34 34 if ( isset( $attributes['isLink'] ) && $attributes['isLink'] ) {
35 - $author_name = sprintf( '<a href="%1$s" target="%2$s" class="wp-block-post-author-name__link">%3$s</a>', get_author_posts_url( $author_id ), esc_attr( $attributes['linkTarget'] ), $author_name );
35 + $author_name = sprintf( '<a href="%1$s" target="%2$s" class="wp-block-post-author-name__link">%3$s</a>', esc_url( get_author_posts_url( $author_id ) ), esc_attr( $attributes['linkTarget'] ), $author_name );
36 36 }
37 37
38 38 $classes = array();
39 39 if ( isset( $attributes['textAlign'] ) ) {