Retrieve a customize section.
public get_section ( string $id ) : WP_Customize_Section | void | ||
$id | string | Section ID. |
return | WP_Customize_Section | void | The section, if set. |
$manager = new WP_Customize_Manager(); $section = $manager->get_section('my_section_id');
$manager = new WP_Customize_Manager(); $sections = $manager->get_sections(); foreach ($sections as $section) { // Do something with the section }This code retrieves all sections in the Customizer and loops through them. Library package: WordPress.
public get_section ( string $id ) : WP_Customize_Section | void | ||
$id | string | Section ID. |
return | WP_Customize_Section | void | The section, if set. |