Does WordPress settings API have any way of passing custom arguments to the callbacks or something? So I don’t have to define seventeen hundred callbacks?
Or knowing the field/section/group name so I can do for example a text input handler that does:
$options = get_option( $setting );
echo "<input id='$option_id' name='$setting[$field]' size='40'
type='text' value='{$options[$field]}' />";
instead of a different callback for each field with all those values hardcoded?
There’s an optional parameter $args which carries an array of parameters. What I did was to set it to this:
and then do this in the common calback
I’ll probably do some more refactoring later on as thoughts come up