block editor – How to find out whether a plugin is used in pages or posts?

Question

I need to find whether any element of the so many Gutenberg- or Elementor-elements have been used in posts or pages.

Example:
I want to deactivate an Elementor Addon Plugin, which creates accordeons
I need to know where this Addon Plugin was used in posts or pages, if not I can deactivate / delete it, if yes I have to replace the output by other elements

Unfortunately I never saw something like a “used in”-list

Any ideas please? I would be happy!

in progress 0
Cornelie Müller-Gödecke 5 months 2021-06-05T04:02:04-05:00 0 Answer 0 views 0

Answer ( 1 )

    0
    2021-06-07T09:21:54-05:00
    <?php
    
    if(is_plugin_active('elementor/elementor.php') || is_plugin_active('woocommerce/woocommerce.php')){
        // Do something, remove scripts etc..
    }

Leave an answer

Browse
Browse