Updating simple widget instance via REST call
-
Sooo I was trying to find everything I need within the Documentation but I am kinda lost…
Just started with WordPress related development recently because of some private “geeky” projects related to IFTTT.
So what I basically want to do:
Create a REST API call to update a simple boolean value of a provided widget.The following pastebin code is simply added to the functions.php and creates a simple widget with a checkbox. If the checkbox is checked within the back end, the corresponding message will be shown on the front end.
Now this value should be editable from a raspberry pi running a script for a photo transistor, checking if the lights turn on/off. If the state changes, I’d like to update the value on the website.
REST should be the right approach for this but I cannot figure how to implement this.
Is this even possible within a simple widget?
Where should I start and is there any tutorial anyone knows about explaining the steps?My resources are limited since this is just a little side project for a nonprofit sports club, so I wouldn’t be able to pay for a plugin (if there is any).
- This topic was modified 5 years, 8 months ago by .
- The topic ‘Updating simple widget instance via REST call’ is closed to new replies.