Created
February 15, 2021 15:11
-
-
Save someguy9/b43f1397e30f2115e38aa9d79454bd34 to your computer and use it in GitHub Desktop.
Removed rel="noopener" from links in WordPress
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Removes rel="noopener" from automatically being added to links in WordPress | |
add_filter( 'tiny_mce_before_init', 'smartwp_allow_unsafe_link_target' ); | |
function smartwp_allow_unsafe_link_target( $mceInit ) { | |
$mceInit['allow_unsafe_link_target'] = true; | |
return $mceInit; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment