[wp-hackers] register_setting tip
mikeschinkel at newclarity.net
Mon May 4 22:17:35 GMT 2009
Is the trick to create a sanitize function that would do the
management of the setting for you, maybe?
WordPress Custom Plugins
On May 4, 2009, at 11:09 AM, Ozh wrote:
> I'm pretty sure this has been answered already and I'll probably
> sepukku when I get the answer, but I can't recall it.
> With, on init :
> register_setting('ozh-options', 'ozh-1', 'intval');
> register_setting('ozh-options', 'ozh-2', 'intval');
> And then on the admin form:
> <?php settings_fields('ozh-options'); ?>
> <input type="text" value="<?php echo get_option('ozh-1'); ?>"
> <input type="text" value="<?php echo get_option('ozh-2'); ?>"
> You end up with one DB entry for each option.
> What's the trick again to store everything in one entry, using the new
> register_setting API ?
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers