help regarding Hide links with anonym.to

Status
Not open for further replies.

Paz

Active Member
1,497
2011
597
0
2 comments
You can try something like this in your functions.php:
PHP:
function anonymize_links($content) {
  $content = preg_replace('#href="([^"]+)"#', 'href="http://anonym.to/?$1"', $content);
  return $content;
}
add_filter('the_content','anonymize_links');
It doesn't handle the exceptions though.
 
Status
Not open for further replies.
Back
Top