Support » Plugin: Elementor Website Builder » Track a widget usage?

  • Resolved myblogisgreat

    (@myblogisgreat)


    Hi,
    Is there any way to track where an Elementor Widget is being (if?) used?
    Example, using some multi-cool Elementor plugin that gives me loads of post galleries.
    By some reason I want to stop using this cool plugin, but of course I have no idea on which page/post I have used it earlier.
    I want to avoid content being removed if I just disable and delete the plugin.

Viewing 2 replies - 1 through 2 (of 2 total)
  • I can’t think of any utility offhand except maybe a search and replace type tool in your database. Maybe even a tool like Query Monitor to see each page/post’s query and every filter/hook used on said page.

    – All widgets by default store their configuration data in the options table.

    – All instances of a particular widget type are under one option as a serialized array.

    – Each widget type has their own option name in the form of “widget_{$widget->id_base}”

    For example, the text widget’s class is WP_Widget_Text. The ID base is the class name with “WP_Widget_” stripped out and lowercased, hence “text”. Thus the option name for all text widgets is “widget_text”.

    Since page builders like Elementor use and execute widgets in their own way, I’d also run a check against the post_meta table to check for any instances and then reference the post id of which that meta is attached.

    Keep in mind, saved revisions and transients may also likely exist with the widget’s name instance even if that widget has been removed from a particular page/post and wouldn’t necessarily cause any issue if the widget’s plugin were to be disabled and removed however if a restore were to be used pulling in meta that calls that widget again it could cause a problem, I am not entirely sure how WordPress or Elementor handles that, if it’s graceful or not.

    Thank you so much for your thorough explanation!
    Thumbs up!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Track a widget usage?’ is closed to new replies.