Paid Addons Support Forum Only

Please note, that here we only support Paid Addons issues and questions.

gVectors Support staff works from 6am to 6pm (GMT+0)

All questions related to wpForo and wpDiscuz free plugins should be asked in the corresponding plugin support forum:

 

wpDiscuz Support Forum   wpForo Support Forum

Problem with censure pro links  

Page 2 / 2

Astghik
Posts: 4129
Admin
(@astghik)
Support Team
Joined: 2 years ago

Hi Mariosgr,

This code should hepl you. Please add it in your current active them's functions.php file.

add_filter('wpforo_content_after', function ($content) {
$s = array('gvectors.com');
$r = array('gvectors.net');
return str_replace($s, $r, $content);
}, 999);

 

Reply
Mariosgr
Posts: 155
Customer
(@mariosgr)
Member
Joined: 2 years ago

this is for all links or i have to  add it for every link i want to change ?

Reply
Astghik
Posts: 4129
Admin
(@astghik)
Support Team
Joined: 2 years ago

Hi @mariosgr,

The code I've provided in the previous post changes certain URL. If you need to change every URL, just use this code, it will replace any URL with an uncensored word.

add_filter('wpforo_content_after', function ($content) {
return preg_replace('@(href=[\'\"]https?://)[^/\'\"\?\&]+([^\'\"]*[\'\"])@is', '$uncensored$2', $content);
}, 999);
Reply
1 Reply
Mariosgr
Customer
(@mariosgr)
Joined: 2 years ago

Member
Posts: 155

Is there a way to change the url with censure words from the actual plugin?

Because in your first code I need to add every single url that I want to change and in your second code it changes every url to what I input as "uncensored"

Reply
Mariosgr
Posts: 155
Customer
(@mariosgr)
Member
Joined: 2 years ago

Thanks! It works and changes the url but for some reason it's no longer clickable, something must be missing

Reply
Astghik
Posts: 4129
Admin
(@astghik)
Support Team
Joined: 2 years ago

Hi @mariosgr

I'm really sorry, but the plugin doesn't have such a feature. Our team provides you some custom codes to use. For more deeper customization you should find some developer. 

Reply
Page 2 / 2
Share: