Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
afragen committed Oct 4, 2022
2 parents 08b10a1 + f1a7eab commit 1f4a297
Show file tree
Hide file tree
Showing 181 changed files with 3,041 additions and 57,469 deletions.
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#### [unreleased]

#### 11.1.3 / 2022-10-04
* replace Freemius SDK with Appsero SDK

#### 11.1.2 / 2022-09-27
* deprecate `gu_maybe_auto_update` cron event

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"afragen/wordpress-plugin-readme-parser": "dev-master",
"afragen/singleton": "dev-master",
"afragen/wp-dependency-installer": "^4",
"freemius/wordpress-sdk": "^2.4"
"appsero/client": "^1.2"
},
"autoload": {
"psr-4": {
Expand Down
87 changes: 47 additions & 40 deletions composer.lock

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

6 changes: 3 additions & 3 deletions git-updater.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* Plugin Name: Git Updater
* Plugin URI: https://git-updater.com
* Description: A plugin to automatically update GitHub hosted plugins, themes, and language packs. Additional API plugins available for Bitbucket, GitLab, Gitea, and Gist.
* Version: 11.1.2
* Version: 11.1.3
* Author: Andy Fragen
* License: MIT
* Domain Path: /languages
Expand Down Expand Up @@ -50,11 +50,11 @@
register_activation_hook( __FILE__, [ new Bootstrap( __FILE__ ), 'rename_on_activation' ] );

( new Zipfile_API() )->load_hooks();
( new GU_Appsero( __FILE__ ) )->init();

add_action(
'plugins_loaded',
function() {
( new GU_Freemius() )->init();
function () {
( new Bootstrap( __FILE__ ) )->run();
}
);
84 changes: 84 additions & 0 deletions src/Git_Updater/GU_Appsero.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
<?php
/**
* Git Updater
*
* @author Andy Fragen
* @license MIT
* @link https://github.com/afragen/git-updater
* @package git-updater
*/

namespace Fragen\Git_Updater;

/*
* Exit if called directly.
*/
if ( ! defined( 'WPINC' ) ) {
die;
}

/**
* Appsero SDK integration.
* Appsero SDK autoloaded via composer.
*/
class GU_Appsero {

/**
* Plugin file path.
*
* @var string
*/
protected $plugin_file;

/**
* Constructor.
*
* @param string $file Plugin file path.
*/
public function __construct( $file ) {
$this->plugin_file = $file;
}

/**
* Let's get going.
*
* @return void
*/
public function init() {
$this->appsero_init_tracker_git_updater();
}

/**
* Initialize the plugin tracker.
*
* @return void
*/
public function appsero_init_tracker_git_updater() {
global $gu_license;

$client = new \Appsero\Client( 'fcd3d5c3-e40c-4484-9530-037955cef71f', 'Git Updater', $this->plugin_file );

// Activate insights.
$client->insights()
->hide_notice()
->add_plugin_data()
->init();
$client->insights()->optin();

$gu_license = $client->license();

// Active license page and checker
// $parent = is_multisite() ? 'settings.php' : 'options-general.php';
// $args = array(
// 'type' => 'submenu',
// 'menu_title' => 'Git Updater License',
// 'page_title' => 'Git Updater License Settings',
// 'menu_slug' => 'git-updater-license',
// 'parent_slug' => $parent,
// );
// $client->license()->add_settings_page( $args );

// Active automatic updater.
// $client->updater();
}
}
86 changes: 0 additions & 86 deletions src/Git_Updater/GU_Freemius.php

This file was deleted.

16 changes: 16 additions & 0 deletions vendor/appsero/client/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/node_modules
/public/hot
/public/storage
/storage/*.key
/vendor
/.idea
/.vscode
/nbproject
/.vagrant
Homestead.json
Homestead.yaml
npm-debug.log
yarn-error.log
.env
.phpunit.result.cache
.DS_Store
21 changes: 21 additions & 0 deletions vendor/appsero/client/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "appsero/client",
"description": "Appsero Client",
"keywords": ["analytics", "wordpress", "plugin", "theme"],
"type": "library",
"license": "MIT",
"authors": [
{
"name": "Tareq Hasan",
"email": "tareq@appsero.com"
}
],
"autoload": {
"psr-4": {
"Appsero\\": "src/"
}
},
"require": {
"php": ">=5.3"
}
}
Loading

0 comments on commit 1f4a297

Please sign in to comment.