-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rest Api? #25
Comments
Sorry, I'm not sure if I understand what you mean. Do you want to implement this plugin within the WordPress Rest API? |
I wanted you to develop rest api feature in this plugin. |
Hi, it's related to #24 as we don't have any public api to insert easily, however, you can implement that using cop_insert() and cop_update(); |
Something like so: Insert$row = array('label' => 'Lorem Ipsum', 'name' => 'lorem_ipsum', 'value' => 'Something here...');
cop_insert($row); Update$row = array('id' => 123, 'label' => 'Lorem Ipsum', 'name' => 'lorem_ipsum', 'value' => 'Something here...');
cop_update($row); |
Instead of inserting and updating. How to get a list of all custom options and values? |
$all = cop_get_options(); |
So I required to use $all = cop_get_options () when creating my own rest api endpoints? |
Or you can just create a variable from the php side and pass it to JS
|
could you please explain/add rest accessibility?
The text was updated successfully, but these errors were encountered: