Created
March 26, 2020 04:47
-
-
Save KaineLabs/b8c5eba187c8ffc5e9c21dc0cf7b1904 to your computer and use it in GitHub Desktop.
Disable Links On Comments
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 | |
/** | |
* Disable Links On Comments. | |
*/ | |
function yzc_disable_links_on_comments( $content ) { | |
if ( empty( $content ) ) { | |
return $content; | |
} | |
return preg_replace( '#<a.*?>([^>]*)</a>#i', '$1', $content ); | |
} | |
add_filter( 'bp_activity_comment_content', 'yzc_disable_links_on_comments' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment