[wp-trac] [WordPress Trac] #21488: Add Default Callback Functions for add_settings_field()
WordPress Trac
wp-trac at lists.automattic.com
Tue Aug 28 20:02:12 UTC 2012
#21488: Add Default Callback Functions for add_settings_field()
-------------------------+------------------------------
Reporter: mordauk | Owner:
Type: enhancement | Status: reopened
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Resolution:
Keywords: has-patch |
-------------------------+------------------------------
Comment (by nacin):
Rather than overloading add_settings_field()'s $callback argument with a
type-like name (as scribu points out), why not just name the actual
function there?
{{{
add_settings_field( 'upload_path', __( 'Upload path' ),
'do_settings_text',
'media', 'uploads',
array(
'id' => 'upload_path', // defaults to first argument,
'name' => 'upload_path', // defaults to first argument, then
['id']
'class' => 'regular-text code',
'description' => __( 'Default is <code>wp-content/uploads</code>'
),
);
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21488#comment:23>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list