I want that If Slug contains "revslider" word, deactivate some plugins and If slug doesnt contain this word, again activate plugin automatically.
I searched in Google and wrote this code (I am not a developer).
$url = $_SERVER["REQUEST_URI"];
$isItSlide = strpos($url, 'revslider');
if ($isItSlide!==false) {
deactivate_plugins( '/resize-image-after-upload/resize-image-after-upload.php' );
} else {
activate_plugins( '/resize-image-after-upload/resize-image-after-upload.php' );
}
If I use this code, it works in first step, Plugin can disable, but it doesnt activate again in other pages.