Block Sidebar and saving data to the database (options)
-
I have had a look for a solution but haven’t found any tutorials or example for my use-case.
I understand that that block setting are saved in the front end, in the markup.
However, I have a situation where I want to develop a block without a settings page, but it needs to pass some data ( API key & secret ) to the back end as it is unsafe for those elements to be exposed in markup.
So I’m thinking to build these is the block side bar and on save post the keys to be saved into the options table ( as you would with a settings page ).
However I’m unclear if there is a standard / secure way of doing this ( secure I’m not too worried about as I assume that in the backend I would sanitize and check capabilities just as I would in a standard jQuery ajax call )
Thanks
The topic ‘Block Sidebar and saving data to the database (options)’ is closed to new replies.