Home Forums Backend Issues (wp-admin) Javascript equivalent to get_fields() for current values?


Javascript equivalent to get_fields() for current values?

  • So the title might not be entirely clear. I was wondering if, while in the editor (classic), it is possible to retrieve a JS object containing all current values of all fields on the current admin screen. Basically the equivalent of what is returned by get_fields(), but run in the client and gets everything on the screen vs database. The goal is to enable real-time previews on a JS frontend by storing all of the pages field values via a storage API such as IndexedDB. Is this currently possible?

  • No, there isn’t. There is a way to get individual field values but there’s nothing in the API that I can see that will get an array with all of the values of all field

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.