WP_Customize_Control::active(): bool

In this article

Check whether control is active to current Customizer preview.

Return

bool Whether the control is active to the current preview.

Source

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

	/**
	 * Filters response of WP_Customize_Control::active().
	 *
	 * @since 4.0.0
	 *
	 * @param bool                 $active  Whether the Customizer control is active.
	 * @param WP_Customize_Control $control WP_Customize_Control instance.
	 */
	$active = apply_filters( 'customize_control_active', $active, $control );

	return $active;
}

Hooks

apply_filters( ‘customize_control_active’, bool $active, WP_Customize_Control $control )

Filters response of WP_Customize_Control::active().

Changelog

VersionDescription
4.0.0Introduced.

User Contributed Notes

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