You don’t have to register_settigs, you can just add the options straight to the database with add_option()
.
You could have like a dummy option “all_pages_created” and if that’s set then don’t check for the individual pages.
if (get_option('all_pages_created') !== false) {
// it's set, do nothing }
else { // check for your pages and update individual_pages_option with update_option()
// and when all pages are created add_option('all_pages_created', 'true', '', 'yes' )
}
Or something like that. It shouldn’t be too hard…
Related Posts:
- Assigning a Setting to a Variable and Using it in an if Statement
- Are transients garbage collected?
- How to pass variable to add_settings_section() callback?
- What’s the difference between Options & Settings?
- Difference between Option_Group and Option_Name in Register_Settings
- Why does WordPress use serialize rather than json_encode for the options table? [duplicate]
- Plugin options will not save in database
- No option to allow search engines to index my site in WP 4.3
- How to update an ‘array’ option using wp-cli [duplicate]
- How to Create a Custom WordPress Install Package?
- Settings API – creating reusable form elements?
- Confirmation before deleting plugin options via uninstall.php
- Efficient way of saving plugin options
- Set WordPress settings programmatically
- How can I get all user options?
- register_setting() vs add_option()
- Settings API – save an array of options as one setting (array_push?)
- Where to hook register_settings for Settings API when also want to update options outside of Settings API?
- How much string content can I store in an option?
- Why isn’t get_option array contents displaying?
- How to Save Different Settings Options Using Settings API and/or the Theme Optimizer
- Save Theme Options (options.php) From The Frontend
- Single callback with multiple setting fields
- Can I use a space in an option name/key?
- How to save WordPress Options as an array?
- How to verify this checkbox is checked?
- What to use , set_transient, set_option or file system? [closed]
- Settings API get_option best practices
- Deploy pre-configured database
- Tab from Settings API resetting all options with INSERT INTO [closed]
- Getting settings saved two times in settings page with tab
- display all posts in wordpress admin crashing after 999 screen option
- Putting my site live
- Where is the submitted $_POST array stored after an option page submission?
- get_option array value defaults and best practices
- Add an option to a Child theme of Twenty Eleven
- WordPress options page not saving
- How to store a value on WP_option table
- Two settings_fields in one form
- Custom blog settings
- Implementing action correctly
- wp_usermeta wp_usersettings
- Can’t save checkbox option
- How to set wp_editor to be email friendly?
- options-general.php page displays different sitename, home compared to wp_options table
- Work flow for multiple developers
- i changed my wordpress address url in SETTINGS – GENRERAL – wordpress address site url. cannot login anymore
- Functions to edit wp-config.php [duplicate]
- Cannot save using register_setting
- Saving plugin options page
- Transients API conditional
- Testing for addon plugin activated
- update a value in wordpress wp_options
- Where have the Privacy Settings gone in WordPress 3.5?
- Is there any other place – besides a theme, a plugin, or a mu-plugin – that an option page might conceivably be used?
- How to save custom settings api fields with custom section fuction
- problem with get_option in dashboard
- Custom options in plugin, register_settings not working as no options.php?
- Google fonts dropdown in Options Framework
- How can I increase the font sizes used by the WordPress visual and HTML post editors?
- How do I retrieve multiple values from a multidimensional array in wp_options?
- Which Hook can I use when creating unique post but not update/save/delete
- Updating just one option with update_option
- Upload file on pre_update_option_{option_name}
- How to use update_option() without replacing/losing the old value?
- how create an html table with all values from a serialized array in option_value
- Accept code input into Options Framework
- WordPress Settings API settings not saving for some users
- Character \ appearing before ‘ after saving a settings page
- How to add a Reset to Defaults button with Settings API?
- How can I clear memcached WordPress site options by hand?
- PHP class to add pages and fields in admin panel
- Autopopulate a value
- get_option() and update_option() in a transaction (for an autoincrement value)
- display category name based on its equivalent id
- Save Plugin Options as Array
- Retrieve my custom settings in the settings/ API endpoint
- Multiple checkbox doesn’t work in wordpress settings api
- Move website from root to sub
- Is saving data to WordPress options as array bad thing to do?
- centralized alternative for get_option: get_site_option, get_network_option or get_site_meta?
- Editing a loaded WordPress option without updating the database
- add image in dropdown select
- User specific settings, limited by role
- Remove Edit Profile option but still have the profile viewable
- Dynamically Update Key in Associative Array When Saving Settings
- Move one option value into another option
- Adding data to options table
- Incorporating the Settings API in WordPress Themes – by Chip Bennet
- WordPress options text format
- Caching of SQL queries
- update_option using variable name
- WordPress theme options tabs
- Importing WP settings to another host
- Only show theme option if it option exists
- $wpdb->update does not update, var_dump of data is correct
- The issue of redirecting my site to a new domain
- Custom general settings (textarea field) don’t output HTML correctly
- Using get_option() for check box field
- Where to adjust presets for slider options “auto rotate” (3, 5, 10, 15 seconds)? [closed]