Opened 11 years ago
Closed 9 years ago
#25154 closed enhancement (wontfix)
add args argument to add_settings_section
Reported by: | cfoellmann | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Plugins | Keywords: | has-patch |
Focuses: | administration | Cc: |
Description
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>'; }
Attachments (1)
Change History (5)
Note: See
TracTickets for help on using
tickets.
hand over args to add_settings_section callback function