packages/kirki-framework/module-loading/src/Module.php
public function init() {
		global $wp_customize;
		if ( ! $wp_customize ) {
			return;
		}
		// Allow disabling the custom loader using the kirki_config filter.
		$config = apply_filters( 'kirki_config', [] );
		if ( isset( $config['disable_loader'] ) && true === $config['disable_loader'] ) {
			return;
		}
		// Add the "loading" icon.
		add_action( 'wp_footer', [ $this, 'add_loader_to_footer' ] );
		add_action( 'wp_head', [ $this, 'add_loader_styles_to_header' ], 99 );
		$this->remove_default_loading_styles();
	}
public function init() {
		global $wp_customize;
		if ( ! $wp_customize ) {
			return;
		}
		// Allow disabling the custom loader using the kirki_config filter.
		$config = apply_filters( 'kirki_config', [] );
		if ( isset( $config['disable_loader'] ) && true === $config['disable_loader'] ) {
			return;
		}
		// Add the "loading" icon.
		add_action( 'wp_footer', [ $this, 'add_loader_to_footer' ] );
		add_action( 'wp_head', [ $this, 'add_loader_styles_to_header' ], 99 );
		$this->remove_default_loading_styles();
	}
public function init ( ) { global $ wp_customize ; if ( ! $ wp_customize ) { return ; } // Allow disabling the custom loader using the kirki_config filter. $ config = apply_filters ( 'kirki_config' , [ ] ) ; if ( isset ( $ config [ 'disable_loader' ] ) && true === $ config [ 'disable_loader' ] ) { return ; } // Add the "loading" icon. add_action ( 'wp_footer' , [ $ this , 'add_loader_to_footer' ] ) ; add_action ( 'wp_head' , [ $ this , 'add_loader_styles_to_header' ] , 99 ) ; $ this -> remove_default_loading_styles ( ) ; }
Runs on init.

@access public
@since 3.0.0
Runs on init .