I’ve searched around for an answer to this, but haven’t found anything very useful. Apologies if this has been asked before.
I’m trying to convert some shortcodes to a more user-friendly options page. Basically, I want the user to be able to edit all of the data/settings through an options page in the Dashboard.
I’ve got a pretty good handle on basic options pages, but I’m running into problems with making the settings dynamic. For example, I need the user to be able to create new content “blocks” through the options page. As a result, I won’t always know how many blocks there are (if any), so I can’t just hard-code the options in with the standard Settings API.
My solution is to pretty much circumvent the Settings API and retrieve the data manually with $_POST. Then I can build an array as I like and update the options using the update_options function.
My question is 2 parts:
1) Is there a way, using the standard Settings API, to generate dynamic options?
2) If not, what are the implications of doing everything manually through $_POST (e.g. security, compatibility, etc.)?
Hopefully that makes some kind of sense, and thanks in advance!
EDIT: It appears I accidentally posted this in the main plugin forum, rather than the Hacks forum. Sorry!
- The topic ‘Admin Pages and Dynamic Options’ is closed to new replies.