Last active
November 11, 2017 06:08
-
-
Save dkd903/b31a920fbc7d4eec343db1358313613d to your computer and use it in GitHub Desktop.
Add target=_blank to WordPress Author Profile Bio / Description in category: http://digitizor.com/add-target-blank-author-wp/
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
// http://digitizor.com/add-target-blank-author-wp/ | |
add_filter( 'get_the_author_description', 'amtf_target_blank_author_desc' ); | |
/** | |
* Add target _blank to links in author description | |
* Drop-in fix (workaround) for: https://core.trac.wordpress.org/ticket/12056 | |
*/ | |
function amtf_target_blank_author_desc( $desc ) { | |
return str_replace( '<a', '<a target="_blank" ', $desc ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment