Hi
With new Gutenberg and WordPress update, there is a functionality to add “noreferrer” back again for ALL the external links.
but in most of the cases, we only need “noopener”.
Is there any support/hook from GP to disable adding noreferrer to external links?
I got a function to do this. Will this cause any issues?
add_filter( ‘wp_targeted_link_rel’, ‘my_targeted_link_rel_remove_noreferrer’ );
function my_targeted_link_rel_remove_noreferrer( $rel_values ) {
return preg_replace( ‘/noreferrer\s*/i’, ”, $rel_values );
}
Also, when I try to edit functions.php I see a message not to edit it and edit the child theme instead. Can I know how to do that and which file to edit?
GeneratePress 2.2.2
GP Premium 1.7.8