-
Notifications
You must be signed in to change notification settings - Fork 0
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
Replace database table configuration with Settings API? #70
Comments
The database storing is handled by Options API. Settings API is for generating admin forms & pages, Settings API implements Options API but is not limited to it. |
I am not 100% certain Settings API can be used as we would like. From the information I have gathered Settings API can be used to add settings fields "Settings" menu item in WordPress' admin panel. I am not sure about adding subpages to "Settings" menu item, because
Using the subpage option wouldn't be ideal either, because it can make finding Smaily settings harder. @tomabel, have you taken an in-depth look of the Settings API (or tried it out)? Would it be possible to keep the menu item placement as it is, but switch forms to Settings API? If Settings API isn't as flexible as I was hoping, then I think the only option would be to use only Options API. |
It can still be used with the |
OK, it is good to know that the menu position can remain the same. But what about |
It's possible to specify the option group and option name as On a different note, I don't think Settings API is worth it. I can see it being helpful for themes and plugins which have a lot of options that only need sanitization (for example title, name). Our plugin has only a few input fields, the bulk of them for verifying API credentials, of which users need ample feedback on (wrong subdomain, credentials valid). However, I think we should implement any benefits of Settings API, like visual consistency and security measures; and use our own implementation of saving/getting data via Options API |
Yeah, I was also questioning if Settings API would provide any real value to our use case or just make implementing desired user experience more difficult than it should be.
Can you please elaborate on this a bit or provide a code example (or a pattern) on how the implementation would look like? |
|
Options API is straight forward and easy to follow, but I am more interested in this part:
How were you planning to implement visual consistency and security measures? |
I am thinking of replacing custom database table based configuration options storing with Wordpress' Settings API, maybe we can utilize it to provide a better plugin experience to the user.
The text was updated successfully, but these errors were encountered: