WP_Customize_Section::active(): bool

In this article

Check whether section is active to current Customizer preview.

Return

bool Whether the section is active to the current preview.

Source

final public function active() {
	$section = $this;
	$active  = call_user_func( $this->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;
}

Hooks

apply_filters( ‘customize_section_active’, bool $active, WP_Customize_Section $section )

Filters response of WP_Customize_Section::active().

Changelog

VersionDescription
4.1.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.