WP_Customize_Panel::active() – Check whether panel is active to current Customizer preview.

You appear to be a bot. Output may be restricted

Description

Check whether panel is active to current Customizer preview.

Usage

$bool = WP_Customize_Panel::active();

Parameters

Returns

bool Whether the panel is active to the current preview.

Source

File name: wordpress/wp-includes/class-wp-customize-panel.php
Lines:

1 to 16 of 16
  final public function active() {
    $panel  = $this;
    $active = call_user_func( $this->WP_Customize_Panel::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;
  }
 

 View on GitHub View on Trac