I use a plugin: “Email Encoder - Protect Email Addresses”
The newest version just breaks Bricks Buildr editor. If they will solve this issue I still have a problem with Bricks form as this plugin encodes e-mail address even in Bricks form. Very easy to make the form useless as the encoded email address will not work.
How could I disable other plugins only in Bricks editor?
It’s probably best to contact their support in this case. Seems like they know that there are compatibility issues with some plugins and themes. Sounds like they’re happy to address them:
thank you for your answers. I wrote to the developer but I don’t see any solution from him.
But it is not a problem. This is a generic problem: Bricks Builder runs as it is a frontend page.
So I need a solution for disable plugins inside Bricks Builder editor view. I tried this:
<?php
function deactivate_plugin_on_specific_url() {
$current_url = $_SERVER['REQUEST_URI']; // Get the current URL
if (strpos($current_url, 'bricks=run') !== false) { // Check if the specific part exists within the current URL
deactivate_plugins('email-encoder-bundle/email-encoder-bundle.php');
}
}
add_action('admin_init', 'deactivate_plugin_on_specific_url');
I’d be interested to know more about the plugin authors solution.
As for deactivating plugins. You shouldn’t activate/deactivate plugins this way AFAIK. Plugins should have hooks/methods for filtering/disabling them where needed, but it’s not good practice to completely disable them.
I agree. The method above what I wrote is not a solution. Actually it works but for everyone, what means on frontend too. And somehow I should activate the plugin again, but when. I can do it by hand what is not a good solution as I could forget it. So there should be a solution for this task but a completely other way.