/**
  * Class constructor
  *
  * We need to override the parent's to set our stylesheet URL
  *
  * @since 0.1.0
  * @param array $types Icon Types
  * @return array
  */
 public function __construct()
 {
     $this->stylesheet = sprintf('%scss/%s%s.css', Menu_Icons::get('url'), $this->type, Menu_Icons::get_script_suffix());
     parent::__construct();
 }
Beispiel #2
0
 /**
  * Register our type
  *
  * @since  0.1.0
  * @param  array $types Icon Types
  * @return array
  */
 public function register($icon_types)
 {
     if (true !== $this->is_config_valid) {
         return $icon_types;
     }
     // Check for duplicate packs
     if (isset($icon_types[$this->type])) {
         trigger_error(sprintf(esc_html($this->messages['duplicate']), sprintf('<strong>%s</strong>', esc_html($this->config['name'])), sprintf('<code><em>%s/config.json</em></code>', esc_html($this->dir))));
         return $icon_types;
     }
     $icon_types = parent::register($icon_types);
     return $icon_types;
 }