Beispiel #1
0
 /**
  * Initializes the plugin.
  *
  * @return void
  */
 public function initialize()
 {
     $updater = new Update\Updater($this->plugin_data['version']);
     $updater->update();
     $text_domain = new L10n\TextDomain($this->plugin_data, $this->file);
     $text_domain->load();
     $taxonomy_controller = new Taxonomy\Controller(new Taxonomy\Taxonomy());
     $taxonomy_controller->initialize();
 }
Beispiel #2
0
 /**
  * Initializes the plugin.
  *
  * @return void
  */
 public function initialize()
 {
     $option = new Setting\Option();
     $updater = new Update\Updater($this->plugin_data['version']);
     $updater->update();
     $text_domain = new L10n\TextDomain($this->plugin_data, $this->file);
     $text_domain->load();
     $setting_controller = new Setting\Controller(new Setting\Setting($option, new Setting\Sanitizer()));
     $setting_controller->initialize();
     $settings_field_controller = new SettingsField\Controller(new SettingsField\View($option));
     $settings_field_controller->initialize();
     $asset_controller = new Asset\Controller(new Asset\Script($this->file, $option));
     $asset_controller->initialize();
 }
Beispiel #3
0
 /**
  * Initializes the plugin.
  *
  * @return void
  */
 public function initialize()
 {
     $option = new Setting\Option();
     $updater = new Update\Updater($this->plugin_data['version']);
     $updater->update();
     $taxonomy_controller = new Taxonomy\Controller(new Taxonomy\Taxonomy($option));
     $taxonomy_controller->initialize();
     if (is_admin()) {
         $text_domain = new L10n\TextDomain($this->plugin_data, $this->file);
         $text_domain->load();
         $settings_page = new SettingsPage\SettingsPage();
         $settings_page_controller = new SettingsPage\Controller(new SettingsPage\View($settings_page, $option));
         $settings_page_controller->initialize();
         $setting_controller = new Setting\Controller(new Setting\Setting($option, new Setting\Sanitizer($settings_page, new SettingsError\Factory(), $option)));
         $setting_controller->initialize();
         $assets_controller = new Asset\Controller(new Asset\Script($this->file), new Asset\Style($this->file), $settings_page);
         $assets_controller->initialize();
     }
 }