target="_blank"
は出力するけど rel
は出力するようにはしていないので、なんで rel
が出力されているのかはパッとはわからないのですが、下記のようなコードを My Snow Monkey プラグイン(あるいは子テーマの functions.php
)に追加することで属性を追加できます。
add_filter(
'snow_monkey_oembed_blog_card_template',
function( $template, $cache ) {
// リンク先が https://snow-monkey.2inc.org/ の場合
if ( 'https://snow-monkey.2inc.org/' === $cache['permalink'] ) {
$p = new \WP_HTML_Tag_Processor( $template );
if ( $p->next_tag( 'a' ) ) {
// 属性を追加
$p->set_attribute( 'rel', 'nofollow noreferer' );
}
$template = $p->get_updated_html();
}
return $template;
},
10,
2
);