Justin Tadlock 7 years ago I don’t believe there’s a function, but you can use the `$new_whitelist_options` global: ` global $new_whitelist_options; // array of option names $option_names = $new_whitelist_options[ $option_group ]; `
David Chandra 7 years ago Thank you Justin. I think it work well. https://github.com/turtlepod/fx-settings-meta-box-example/blob/master/fx-settings-meta-box-example.php#L293
Justin Tadlock 7 years ago Cool. I wish WP would flesh out the APIs for some of this stuff sometimes. I hate relying on globals like that, but it’s all we’ve got to work with.
Hi Justin and all,
When we register our option using register_settings()
http://codex.wordpress.org/Function_Reference/register_setting
We define the option group,
Is there a way to get the list of option name in the same group?
Thank you.
I don’t believe there’s a function, but you can use the `$new_whitelist_options` global:
`
global $new_whitelist_options;
// array of option names
$option_names = $new_whitelist_options[ $option_group ];
`
Thank you Justin.
I think it work well.
https://github.com/turtlepod/fx-settings-meta-box-example/blob/master/fx-settings-meta-box-example.php#L293
Cool. I wish WP would flesh out the APIs for some of this stuff sometimes. I hate relying on globals like that, but it’s all we’ve got to work with.