Home>Support>Getting instance data for widget inside Ajax request?

Getting instance data for widget inside Ajax request?

Notice: This thread is over two years old; the information may be outdated. Please consider creating a new thread if you require free support. If you have an active SiteOrigin Premium license, you can email our premium support desk at [email protected].

I’m writing a widget which needs to store authentication information as part of the instance data. This data should not be present within the source code of the page, so i can’t send it together with the Ajax requests of the widget.

What i want to do:

Give the widget an id (if it not already has an internal id)
Add that id to widgets source code (html, hidden input, etc.)
Send an Ajax request to wordpress including the widgets id
Inside the Ajax handler: Get the instance data of that widget for that id

Does SiteOrigin support any kind of mechanism like this one? The examples and tutorials do not mention it.

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More