public function __construct($args) { /** * Run the parent class constructor */ parent::__construct($args); /** * Set the field arguments */ $this->args = $args; /** * Create the settings. */ new Lessekirki_Settings($this->args); /** * Check if we're on the customizer. * If we are, then we will create the controls, * add the scripts needed for the customizer * and any other tweaks that this field may require. */ if ($this->wp_customize) { /** * Create the control */ new Lessekirki_Control($this->args); /** * Create the scripts for postMessage to properly work */ Lessekirki_Customizer_Scripts_PostMessage::generate_script($this->args); /** * Create the scripts for tooltips. */ Lessekirki_Customizer_Scripts_Tooltips::generate_script($this->args); } }