Okey I got it. I was close the whole time 🙂
function weborder_leveranstext_render( ) {
$options = get_option( 'weborder_settings' );
global $wp_roles;
$all_roles = $wp_roles->get_names();
foreach ($all_roles as $role => $value) {
echo '<br><span style="width: 180px; display: inline-block;">' . $value . '</span>';
echo '<input type="text" style="width: 300px;" name="weborder_settings[weborder_leveranstext]['.$role.']" value="'.$options['weborder_leveranstext'][$role].'">';
}
}
Related Posts:
- How to retrieve the options from this options page?
- Multiple checkbox doesn’t work in wordpress settings api
- Are transients garbage collected?
- Are all options loaded to memory on each request?
- 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
- get_option() is not working even db contains the corresponding option_name and option_value
- Single callback with multiple setting fields
- Proper use of option_page_capability_{$page_name}
- Can I use a space in an option name/key?
- How to save WordPress Options as an array?
- update_option not working in stand-alone PHP script
- 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
- Allow spiders to crawl my site (selectable option in wp)
- Putting my site live
- Where is the submitted $_POST array stored after an option page submission?
- get_option array value defaults and best practices
- WordPress setting with select – where is my mistake?
- Add an option to a Child theme of Twenty Eleven
- The Settings API – What is the purpose of default value in register_setting?
- 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
- Set $options reference
- Settings API validation callback
- Different Front page for Mobile
- How to save user meta on custom admin page
- Is there an optimized, WordPress-y way to not call a `get_option` twice?
- Warn user that data may be lost for custom pages
- get_option and list of options
- Changing max number of blog posts per page doesn’t work
- Add description to custom plugin setting
- Block properties, attributes and settings
- 403 error on submit at the plugin options page
- Assigning a Setting to a Variable and Using it in an if Statement
- WordPress get_option() on AJAX issue
- ‘delete_option()’ only deleting the value, not the key/value pair
- Theme Option select values
- If option: show this. Else show nothing
- How can you store your option at the permalink settings page?
- Plugin to import/export wp_options
- Uploading and inserting an image using a custom option panel like in the Twenty Ten theme?
- wp_options not returning value for logged out users?
- Drop Down options aren’t saving in my wordpress plugin options page
- WP Optimization: Overwriting options to autoload=yes for often used options?
- Option value not get saved in the database
- How to load WordPress on non WP page?
- update_option() passing empty array() but still updating
- Is there a standard technique or API for getting the site header image?
- How to save Checkbox-Options in Plugin Options Page
- how to compare update_option() after it saves to database?
- Some entries delete_option doesn’t work
- Options saved and called in wrong order
- Use delete_option in action link
- Access saved Options / Settings
- Hold a comment in the queue if it contains [X] or more links
- Trying to change settings -> firefox downloads options.php instead
- Share content between two different sites in same domain
- wp_allow_comments checking for blacklisted words effectively
- How to add options for Pages?
- options validator input is false?
- Best place to store company address
- Fatal error: Call to undefined function get_option()
- Why wp_load_alloptions() fetches all options if no options is set to autoload?
- What is the real purpose of the parameter $option_group in the function register_setting()?