GC_Customize_Control::active()

最后更新于:2021-11-26 23:19:54

GC_Customize_Control::active()

Check whether control is active to current Customizer preview.

响应

(bool) Whether the control is active to the current preview.

源文件

文件: gc-includes/class-gc-customize-control.php

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

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

		return $active;
	}