Skip to content

Commit

Permalink
[~] updater config def moved in constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrea Fiadone committed May 7, 2020
1 parent a778ec6 commit d67a4e8
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 25 deletions.
2 changes: 1 addition & 1 deletion Aeria/Aeria.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
*/
class Aeria extends Container
{
const VERSION = '3.2.9';
const VERSION = '3.2.10';

/**
* Constructs the Aeria container.
Expand Down
8 changes: 0 additions & 8 deletions Aeria/Kernel/Tasks/CreateUpdater.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,5 @@ class CreateUpdater extends Task
*/
public function do(array $args)
{
$args['service']['updater']->config(
[
// "access_token" => "",
'slug' => 'aeria/aeria.php',
'version' => $args['container']->version(),
'proper_folder_name' => 'aeria',
]
);
}
}
19 changes: 6 additions & 13 deletions Aeria/Updater/Updater.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,19 @@ class Updater
*/
public function __construct()
{
// set config
$this->config = [
'slug' => 'aeria/aeria.php',
'proper_folder_name' => 'aeria',
];
// define the alternative API for updating checking
add_filter('pre_set_site_transient_update_plugins', array($this, 'checkVersion'));
// Define the alternative response for information checking
// define the alternative response for information checking
add_filter('plugins_api', array($this, 'setPluginInfo'), 10, 3);
// reactivate plugin
add_filter('upgrader_post_install', array($this, 'postInstall'), 10, 3);
}

/**
* Saves the provided config.
*
* @param array $config the configuration
*
* @since Method available since Release 3.0.0
*/
public function config($config)
{
$this->config = $config;
}

/**
* Gets the plugin data from plugin.php.
*
Expand Down
2 changes: 1 addition & 1 deletion aeria.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Plugin Name: Aeria
* Plugin URI: https://github.com/caffeinalab/aeria
* Description: Aeria is a modular, lightweight, fast WordPress Application development kit.
* Version: 3.2.9
* Version: 3.2.10
* Author: Caffeina
* Author URI: https://caffeina.com
* Text Domain: aeria
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aeria",
"version": "3.2.9",
"version": "3.2.10",
"description": "Aeria",
"scripts": {
"dev": "webpack --watch --mode development",
Expand Down

0 comments on commit d67a4e8

Please sign in to comment.