Пример #1
0
 public function __construct($args)
 {
     /**
      * Run the parent class constructor
      */
     parent::__construct($args);
     /**
      * Set the field arguments
      */
     $this->args = $args;
     /**
      * Create the settings.
      */
     new Kirki_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 Kirki_Control($this->args);
         /**
          * Create the scripts for postMessage to properly work
          */
         Kirki_Customizer_Scripts_PostMessage::generate_script($this->args);
         /**
          * Create the scripts for tooltips.
          */
         Kirki_Customizer_Scripts_Tooltips::generate_script($this->args);
     }
 }
 /**
  * The class constructor
  *
  * @var $id    string    the configuration ID
  * @var $args  array     the configuration arguments
  * @return     void
  */
 public function __construct($id, $args = array())
 {
     // Call the parent constructor
     parent::__construct();
     // Set the default args
     $this->default_args = array('capability' => 'edit_theme_options', 'option_type' => 'theme_mod', 'option_name' => '', 'compiler' => array());
     // Process the 'kirki/config' filter by replacing the defaults
     $this->default_args = $this->config_from_filters();
     // Add the config
     $this->add_config($id, $args);
 }
Пример #3
0
 /**
  * The class constructor
  */
 public function __construct($args)
 {
     // call the parent constructor
     parent::__construct($args);
     /**
      * Apply the 'kirki/control_types' filter to Kirki_Control::$control_types.
      * We can use that to register our own customizer controls and extend Kirki.
      */
     self::$control_types = apply_filters('kirki/control_types', self::$control_types);
     /**
      * Apply the 'kirki/setting_types' filter to Kirki_Control::$control_types.
      * We can use that to register our own setting classes for controls and extend Kirki.
      */
     self::$setting_types = apply_filters('kirki/setting_types', self::$setting_types);
     // Add the control
     $this->add_control($args);
 }
Пример #4
0
 public function __construct($args)
 {
     parent::__construct($args);
     $this->add_settings($args);
 }
Пример #5
0
 /**
  * The class constructor
  *
  * @var $args    the panel arguments
  */
 public function __construct($args)
 {
     parent::__construct($args);
     $this->add_panel($args);
 }
Пример #6
0
 public function __construct()
 {
     parent::__construct();
     $this->fields_from_filters();
 }
Пример #7
0
 public function __construct($id, $args = array())
 {
     parent::__construct();
     $this->default_args = array('capability' => 'edit_theme_options', 'option_type' => 'theme_mod', 'option_name' => '', 'compiler' => array());
     $this->add_config($id, $args);
 }