[Plugin: Twitter Widget Pro] [GIFT] Improved #hashtags regex to match accentuated characters
-
Hi there
First : thanks very much for this great plugin which helps me a lot.So I’m French and I use accentuated characters in hashtags. The original regex couldn’t match with those hashtags, so I’ve tweaked it a bit.
Regex is situated in : /[your_plugin_directory]/wp-twitter-widget.php at line 451 – in public function linkHashtags().
Just replace the preg_replace_callback() regex :
'/(^|\s)(#\w*)/i'
by this one :
'/(^|\s)(#[a-zA-Z0-9àá????àáa???òó????òó????èéê?èéê???ìí??ìí??ùú?üùú?ü???]*)/i'
I’m not a programmer so I suppose this code isn’t very nice and smart but I does the job for me.
I hope it will help someone as it helped me. ??
https://www.ads-software.com/extend/plugins/twitter-widget-pro/
- The topic ‘[Plugin: Twitter Widget Pro] [GIFT] Improved #hashtags regex to match accentuated characters’ is closed to new replies.