WP_Customize_Section::active() – Check whether section is active to current Customizer preview.

You appear to be a bot. Output may be restricted

Description

Check whether section is active to current Customizer preview.

Usage

$bool = WP_Customize_Section::active();

Parameters

Returns

bool Whether the section is active to the current preview.

Source

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

1 to 16 of 16
  final public function active() {
    $section = $this;
    $active  = call_user_func( $this->WP_Customize_Section::active_callback, $this );

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

    return $active;
  }
 

 View on GitHub View on Trac