register_control_type( $atts['callback'] ); } } /** * Returns control instance * * @param string $control_type control type. * @since 1.4.3 * @return string */ public static function get_control_instance( $control_type ) { $control_class = self::get_control( $control_type ); if ( isset( $control_class['callback'] ) ) { return class_exists( $control_class['callback'] ) ? $control_class['callback'] : false; } return false; } /** * Returns control and its attributes * * @param string $control_type control type. * @since 1.4.3 * @return array */ public static function get_control( $control_type ) { if ( isset( self::$controls[ $control_type ] ) ) { return self::$controls[ $control_type ]; } return array(); } /** * Returns Santize callback for control * * @param string $control control. * @since 1.4.3 * @return string */ public static function get_sanitize_call( $control ) { if ( isset( self::$controls[ $control ]['sanitize_callback'] ) ) { return self::$controls[ $control ]['sanitize_callback']; } return false; } } } /** * Kicking this off by calling 'get_instance()' method */ new Astra_Customizer_Control_Base();