packages/kirki-framework/module-section-icons/src/Module.php
public function customize_controls_enqueue_scripts() {
		$sections = Kirki::$sections;
		$panels   = Kirki::$panels;

		// Parse sections and find ones with icons.
		foreach ( $sections as $section ) {
			if ( isset( $section['icon'] ) ) {
				$this->add_icon( $section['id'], $section['icon'], 'section' );
			}
		}

		// Parse panels and find ones with icons.
		foreach ( $panels as $panel ) {
			if ( isset( $panel['icon'] ) ) {
				$this->add_icon( $panel['id'], $panel['icon'], 'panel' );
			}
		}

		wp_enqueue_script( 'kirki_panel_and_section_icons', URL::get_from_path( __DIR__ . '/icons.js' ), [ 'jquery', 'customize-base', 'customize-controls' ], KIRKI_VERSION, true );
		wp_localize_script( 'kirki_panel_and_section_icons', 'kirkiIcons', self::$icons );
	}
public function customize_controls_enqueue_scripts() {
		$sections = Kirki::$sections;
		$panels   = Kirki::$panels;

		// Parse sections and find ones with icons.
		foreach ( $sections as $section ) {
			if ( isset( $section['icon'] ) ) {
				$this->add_icon( $section['id'], $section['icon'], 'section' );
			}
		}

		// Parse panels and find ones with icons.
		foreach ( $panels as $panel ) {
			if ( isset( $panel['icon'] ) ) {
				$this->add_icon( $panel['id'], $panel['icon'], 'panel' );
			}
		}

		wp_enqueue_script( 'kirki_panel_and_section_icons', URL::get_from_path( __DIR__ . '/icons.js' ), [ 'jquery', 'customize-base', 'customize-controls' ], KIRKI_VERSION, true );
		wp_localize_script( 'kirki_panel_and_section_icons', 'kirkiIcons', self::$icons );
	}
public function customize_controls_enqueue_scripts ( ) { $ sections = Kirki :: $ sections ; $ panels = Kirki :: $ panels ; // Parse sections and find ones with icons. foreach ( $ sections as $ section ) { if ( isset ( $ section [ 'icon' ] ) ) { $ this -> add_icon ( $ section [ 'id' ] , $ section [ 'icon' ] , 'section' ) ; } } // Parse panels and find ones with icons. foreach ( $ panels as $ panel ) { if ( isset ( $ panel [ 'icon' ] ) ) { $ this -> add_icon ( $ panel [ 'id' ] , $ panel [ 'icon' ] , 'panel' ) ; } } wp_enqueue_script ( 'kirki_panel_and_section_icons' , URL :: get_from_path ( __DIR__ . '/icons.js' ) , [ 'jquery' , 'customize-base' , 'customize-controls' ] , KIRKI_VERSION , true ) ; wp_localize_script ( 'kirki_panel_and_section_icons' , 'kirkiIcons' , self :: $ icons ) ; }
Format the script in a way that will be compatible with WordPress.
Format the script in a way that will be compatible with WordPress .