Skip to content

Commit

Permalink
Merge pull request #251 from ndiego/remove-noreferrer-from-site-link-…
Browse files Browse the repository at this point in the history
…block

Remove `noreferrer` from Site Link and Site Meta List blocks.
  • Loading branch information
ndiego authored Oct 17, 2023
2 parents 7128885 + 71c45ae commit 8337225
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function render( $attributes, $content, $block ) {

$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => 'external-link' ) );
return sprintf(
'<p %1$s><a href="%2$s" target="_blank" rel="noopener noreferrer">%3$s</a></p>',
'<p %1$s><a href="%2$s" target="_blank" rel="noopener">%3$s</a></p>',
$wrapper_attributes,
esc_url( $domain ),
esc_html( $pretty_domain )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ function get_value( $type, $key, $post_id ) {
$value = get_the_date( 'F Y', $post_id );
} else if ( 'domain' === $key ) {
// Domain uses shortcodes to output pretty format.
$value = do_shortcode( '<a class="external-link" href="[domain]" target="_blank" rel="noopener noreferrer">[pretty_domain]</a>' );
$value = do_shortcode( '<a class="external-link" href="[domain]" target="_blank" rel="noopener">[pretty_domain]</a>' );
} else if ( 'post_title' === $key ) {
$value = sprintf( '<a href="%s">%s</a>', get_permalink( $post_id ), get_the_title( $post_id ) );
}
Expand Down

0 comments on commit 8337225

Please sign in to comment.