PluginProbe
Gutenberg / 14.5.2
Gutenberg v14.5.2
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 12.6.0 All 403 releases
← All changes | build/block-library/blocks/post-title.php +2 -1 12.6.0 → 14.5.2 View file →
@@ -33,9 +33,10 @@
33 33 $tag_name = 0 === $attributes['level'] ? 'p' : 'h' . $attributes['level'];
34 34 }
35 35
36 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 );
37 + $rel = ! empty( $attributes['rel'] ) ? 'rel="' . esc_attr( $attributes['rel'] ) . '"' : '';
38 + $title = sprintf( '<a href="%1$s" target="%2$s" %3$s>%4$s</a>', get_the_permalink( $post_ID ), esc_attr( $attributes['linkTarget'] ), $rel, $title );
38 39 }
39 40 $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $align_class_name ) );
40 41
41 42 return sprintf(