Ledger Nano X - The secure hardware wallet

Uklanjanje nofollow iz linkova u tekstu komentara

urosevic May 16th, 2020 (edited) 1,099 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Skloni nofollow iz teksta komentara samo na front-endu
  2. if (false === strpos($_SERVER['REQUEST_URI'], 'wp-admin')) {
  3.     add_filter('comment_text', 'wpsr_au_remove_nofollow');
  4. }
  5. function wpsr_au_remove_nofollow($text) {
  6.     $text = preg_replace("/(<a[^>]*[^\s])(\s*)nofollow(\s*)/i", "$1$2", $text);
  7.     $text = preg_replace("/(<a[^>]*[^\s])(\s*rel=[\"\']\s*[\"\'])/i", "$1", $text);
  8.     return $text;
  9. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand