[wp-trac] [WordPress Trac] #25154: add args argument to add_settings_section
WordPress Trac
noreply at wordpress.org
Tue Aug 27 06:52:19 UTC 2013
#25154: add args argument to add_settings_section
-------------------------+-----------------------------
Reporter: cfoellmann | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Keywords: has-patch
-------------------------+-----------------------------
Added an $args array to the function
{{{
add_settings_section( $id, $title, $callback, $page )
}}}
which results in
{{{
add_settings_section( $id, $title, $callback, $page, $args = array() )
}}}
Example functions:
{{{
function register_some_settings() {
add_settings_section(
'some_id', // $id
'Some Title', // $title
'generate_section', // $callback
'some_page', // $page
array(
"desc" => "some text for the section description"
)
);
// add some fields ...
add_settings_section(
'some_other_id', // $id
'Another Title', // $title
'generate_section', // $callback
'some_page', // $page
array(
"desc" => "A DIFFERENT text for the second
section's description"
)
);
}
function generate_section( $args ) {
echo '<p>' . $args['desc'] . '</p>';
}
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/25154>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list