Adds a customize section.
$idWP_Customize_Section|stringrequired
$argsarrayoptional
Default:array()
public function add_section( $id, $args = array() ) {
if ( $id instanceof WP_Customize_Section ) {
$section = $id;
} else {
$section = new WP_Customize_Section( $this, $id, $args );
}
$this->sections[ $section->id ] = $section;
return $section;
}
| Version | Description |
|---|---|
| 4.5.0 | Return added WP_Customize_Section instance. |
| 3.4.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_customize_manager/add_section