Astra_Customizer_Control_Base::add_control( String $name, Array $atts )

Add Control to self::$controls and Register control to WordPress Customizer.


Description


Parameters

$name

(String) (Required) Slug for the control.

$atts

(Array) (Required) Control Attributes.


Return

(void)


Source

File: inc/customizer/custom-controls/class-astra-customizer-control-base.php

		public static function add_control( $name, $atts ) {
			global $wp_customize;
			self::$controls[ $name ] = $atts;

			if ( isset( $atts['callback'] ) ) {
				/**
				 * Register controls
				 */
				$wp_customize->register_control_type( $atts['callback'] );
			}
		}


User Contributed Notes

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