packages/kirki-framework/core/src/Init.php
public function add_sections() {
		if ( ! empty( Kirki::$sections ) ) {
			foreach ( Kirki::$sections as $section_args ) {
				// Extra checks for nested sections.
				if ( isset( $section_args['section'] ) ) {
					if ( isset( Kirki::$sections[ $section_args['section'] ] ) ) {
						// Set the type to nested.
						$section_args['type'] = 'kirki-nested';
						// We need to check if the parent section is nested inside a panel.
						$parent_section = Kirki::$sections[ $section_args['section'] ];
						if ( isset( $parent_section['panel'] ) ) {
							$section_args['panel'] = $parent_section['panel'];
						}
					}
				}
				new Section( $section_args );
			}
		}
	}
public function add_sections() {
		if ( ! empty( Kirki::$sections ) ) {
			foreach ( Kirki::$sections as $section_args ) {
				// Extra checks for nested sections.
				if ( isset( $section_args['section'] ) ) {
					if ( isset( Kirki::$sections[ $section_args['section'] ] ) ) {
						// Set the type to nested.
						$section_args['type'] = 'kirki-nested';
						// We need to check if the parent section is nested inside a panel.
						$parent_section = Kirki::$sections[ $section_args['section'] ];
						if ( isset( $parent_section['panel'] ) ) {
							$section_args['panel'] = $parent_section['panel'];
						}
					}
				}
				new Section( $section_args );
			}
		}
	}
public function add_sections ( ) { if ( ! empty ( Kirki :: $ sections ) ) { foreach ( Kirki :: $ sections as $ section_args ) { // Extra checks for nested sections. if ( isset ( $ section_args [ 'section' ] ) ) { if ( isset ( Kirki :: $ sections [ $ section_args [ 'section' ] ] ) ) { // Set the type to nested. $ section_args [ 'type' ] = 'kirki-nested' ; // We need to check if the parent section is nested inside a panel. $ parent_section = Kirki :: $ sections [ $ section_args [ 'section' ] ] ; if ( isset ( $ parent_section [ 'panel' ] ) ) { $ section_args [ 'panel' ] = $ parent_section [ 'panel' ] ; } } } new Section ( $ section_args ) ; } } }
Register our sections to the WordPress Customizer.

@var object The WordPress Customizer object
Register our sections to the WordPress Customizer .