Created
July 5, 2019 14:53
-
-
Save man4toman/a645c4022f741c879110d09834f73d12 to your computer and use it in GitHub Desktop.
Remove links from Topic Authors/Post Ccontent in standalone bbPress
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 | |
add_filter('get_user_link', 'remove_link_from_author'); | |
function remove_link_from_author(){ | |
return ""; | |
} | |
add_filter('get_post_text', 'remove_link_from_post'); | |
function remove_link_from_post($content){ | |
$result = preg_replace('/<a href=\"(.*?)\">(.*?)<\/a>/', "\\2", $content); | |
return $result; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment