WP_Customize_Panel::active()publicWP 4.1.0

Check whether panel is active to current Customizer preview.

Method of the class: WP_Customize_Panel{}

Hooks from the method

Return

true|false. Whether the panel is active to the current preview.

Usage

$WP_Customize_Panel = new WP_Customize_Panel();
$WP_Customize_Panel->active();

Changelog

Since 4.1.0 Introduced.

WP_Customize_Panel::active() code WP 6.5.2

final public function active() {
	$panel  = $this;
	$active = call_user_func( $this->active_callback, $this );

	/**
	 * Filters response of WP_Customize_Panel::active().
	 *
	 * @since 4.1.0
	 *
	 * @param bool               $active Whether the Customizer panel is active.
	 * @param WP_Customize_Panel $panel  WP_Customize_Panel instance.
	 */
	$active = apply_filters( 'customize_panel_active', $active, $panel );

	return $active;
}