| @@ -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( |