0

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!

1

You are looking for:

is_plugin_active( string $plugin )

This function takes a string parameter that is the representation of the path to the plugin relative path in the plugins directory.

So your practical implementation would look something like this:

<?php

if(is_plugin_active('elementor/elementor.php') || is_plugin_active('woocommerce/woocommerce.php')){
    // Do something, remove scripts etc..
}
0

I would deactivate it, check if site its working properly, if so it can be deleted, if not its always possible to activate it again and everything returns to normal.

1
  • I think OP was hoping to avoid the check-everything-manually step, and definitively work out whether it's used automatically.
    – Rup
    Jun 8 '21 at 13:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.