//////blokir keseluruhan :///////
function restrict_links_in_posts($content) {
// Remove all tags
$content = preg_replace(‘/]*>.*?<\/a>/i’, ”, $content);
return $content;
}
add_filter(‘the_content’, ‘restrict_links_in_posts’);
/////blokir kusus penulis / author ://///
function restrict_links_in_author_posts($content) {
if (current_user_can(‘author’)) {
// Remove all tags
$content = preg_replace(‘/]*>.*?<\/a>/i’, ”, $content);
}
return $content;
}
add_filter(‘the_content’, ‘restrict_links_in_author_posts’);