How to use checked() function with multiple check box group? How to properly sanitize that checkbox group?

So checked is fairly simple to understand. It compares the first two values. If they’re equal, it spits out checked=”checked” if they aren’t equal nothing happens. <?php $saved = ‘on’; $compare=”on” // spits out checked=”checked” checked($saved, $compare); $saved = ‘off’; // does nothing checked($saved, $compare); How you save check boxes it up to you. Because … Read more

Options Framework not saving options correctly

The options are saved as an array under a single key, what you see in the db is serialized data. WordPress takes care of unserializing the data when the option is loaded, so you can reference each individual option the same way you’d reference an element in any php array: $my_options = get_option(‘RWWA’); echo $my_options[‘colour’];

How to get functions.php to talk to options.php

When you save an array of data in an option, WordPress serializes it to save, then when you use get_option, it gets unserialized back into the original array, so it can be accessed as you’d access any indexed array without keys in php: original option added: $hsv = array(‘hval’,’sval’,’vval’); add_option(‘hsv’, $hsv); then, to access this … Read more

Upload images – Theme options

I can’t comment on your code, but you might find this link useful: Options Framework Theme: http://wptheming.com/options-framework-theme/ This is something you have to edit carefully, but it has pretty much every type of control you can think of in there. It also had the only working MCE Editor that I could find. I wanted that … Read more

Cannot modify headers

When you redirect via wp_safe_redirect, this is done by sending a header to the browser containing the URL to redirect to. If any content has been sent to the browser before trying to send this header, you get the headers already sent error. Once content goes to the browser, happy header time is over, no … Read more

Can Settings API setting generate other settings?

I believe you should be able to use the update_option_{$option} hook: do_action( “update_option_{$option}”, $oldvalue, $_newvalue ); Something like: add_action( “update_option_youroptionname”, function ($oldvalue, $_newvalue) { // process your option value and update/insert options as needed // var_dump($oldvalue, $_newvalue); // debug // wp_die(); // debug }, 1,2 ); Be sure to replace “youroptionname” with the appropriate value.