コード例 #1
0
 /**
  * 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();
 }
コード例 #2
0
ファイル: type-fontpack.php プロジェクト: joelbass/wp_demo
 /**
  * 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($pack)
 {
     $this->messages = array('no_config' => __('Menu Icons: %1$s was not found in %2$s.', 'menu-icons'), 'invalid' => __('Menu Icons: %1$s is not set or invalid in %2$s.', 'menu-icons'), 'duplicate' => __('Menu Icons: %1$s is already registered. Please check your font pack config file: %2$s.', 'menu-icons'));
     $this->dir = sprintf('%s/%s', Menu_Icons::get('fontpacks_dir_path'), $pack);
     $this->url = sprintf('%s/%s', Menu_Icons::get('fontpacks_dir_url'), $pack);
     if (!is_readable($this->dir . '/config.json')) {
         trigger_error(sprintf(esc_html($this->messages['no_config']), '<code><em>config.json</em></code>', sprintf('<code>%s</code>', esc_html($this->dir))));
         return;
     }
     $this->read_config();
     $this->validate();
     if (false === $this->is_config_valid) {
         return;
     }
     $this->set_properties();
     parent::__construct();
 }