Skip to content

Commit

Permalink
Composer udpate
Browse files Browse the repository at this point in the history
  • Loading branch information
raftaar1191 committed Feb 13, 2024
1 parent 698ccf6 commit fbfe52f
Show file tree
Hide file tree
Showing 10 changed files with 108 additions and 23 deletions.
2 changes: 1 addition & 1 deletion admin/licenses-update/plugin-update-checker/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/
function pin_comment_plugins_update_checker_github( $packages ) {

$packages[1000] = array(
$packages[999] = array(
'repo' => 'https://github.com/acrosswp/pin-comment',
'file_path' => PIN_COMMENT_FILES,
'plugin_name_slug' => PIN_COMMENT_PLUGIN_NAME_SLUG,
Expand Down
10 changes: 5 additions & 5 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 includes/class-pin-comment.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ final class Pin_Comment {
*/
public function __construct() {

$this->plugin_name = 'pin-comment';

$this->define_constants();

if ( defined( 'PIN_COMMENT_VERSION' ) ) {
Expand All @@ -86,8 +88,6 @@ public function __construct() {
$this->version = '1.0.0';
}

$this->plugin_name = 'pin-comment';

$this->load_dependencies();

$this->set_locale();
Expand Down Expand Up @@ -290,7 +290,7 @@ private function define_admin_hooks() {
$plugin_admin = new Pin_Comment_Admin( $this->get_plugin_name(), $this->get_version() );

if( class_exists( 'AcrossWP_Plugin_Update_Checker_Github' ) ) {
new AcrossWP_Plugin_Update_Checker_Github();
AcrossWP_Plugin_Update_Checker_Github::instance();;
}

$rest_api = new Pin_Comment_Rest_Controller( $this->get_plugin_name(), $this->get_version() );
Expand Down
65 changes: 65 additions & 0 deletions vendor/acrosswp/acrosswp-plugin-update-checker-github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Editors
project.xml
project.properties
/nbproject/private/
.buildpath
.project
.settings*
.idea
.vscode
*.sublime-project
*.sublime-workspace
.sublimelinterrc

# Grunt
/node_modules/
none

# Sass
.sass-cache/

# Compiled CSS
/assets/css/*.css

# Minified JS
/assets/js/admin/*.min.js
/assets/js/frontend/*.min.js

# OS X metadata
.DS_Store

# Windows junk
Thumbs.db

# Behat/CLI Tests
tests/cli/installer
tests/cli/composer.phar
tests/cli/composer.lock
tests/cli/composer.json
tests/cli/vendor

# Unit tests
/tmp
/tests/bin/tmp
/tests/e2e-tests/config/local-*.json
/tests/e2e-tests/config/local.json

# Logs
/logs

# Composer
contributors.md
composer.lock
/vendor/

# Packages
/packages/*
!/packages/README.md

# Screenshots for e2e tests failures
/screenshots/

# Language files
i18n/languages/woocommerce.pot

/assets/dist/css/frontend-style.\*.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
* @subpackage Post_Anonymously/includes
*/

if( ! class_exists( 'AcrossWP_Plugin_Update_Checker_Github' ) ) {
if ( ! class_exists( 'AcrossWP_Plugin_Update_Checker_Github' ) ) {

/**
* Fired during plugin licenses.
*
Expand All @@ -40,7 +41,24 @@ class AcrossWP_Plugin_Update_Checker_Github {
*
* @since 0.0.1
*/
protected $packages = array();
public $packages = array();

/**
* Main Pin_Comment Instance.
*
* Ensures only one instance of WooCommerce is loaded or can be loaded.
*
* @since 1.0.0
* @static
* @see Pin_Comment()
* @return Pin_Comment - Main instance.
*/
public static function instance() {
if ( is_null( self::$_instance ) ) {
self::$_instance = new self();
}
return self::$_instance;
}

/**
* Initialize the collections used to maintain the actions and filters.
Expand All @@ -52,7 +70,7 @@ public function __construct() {
/**
* Action to do update for the plugins
*/
add_action( 'init', array( $this, 'plugin_updater' ) );
add_action( 'init', array( $this, 'plugin_updater' ), 1000 );
}

/**
Expand All @@ -71,7 +89,9 @@ public function plugin_updater() {
* Check if the $this->get_packages() is empty or not
*/
if( ! empty( $this->get_packages() ) ) {

foreach ( $this->get_packages() as $package ) {

$github_repo = $package['repo'];
$file_path = $package['file_path'];
$plugin_name_slug = $package['plugin_name_slug'];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"plugin"
],
"autoload": {
"files": ["updater.php"]
"files": ["acrosswp-plugin-update-checker-github.php"]
},
"require": {
"yahnis-elsts/plugin-update-checker": "dev-master"
Expand Down
2 changes: 1 addition & 1 deletion vendor/composer/autoload_files.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
'ba3e6311190fef6b803d614907261c88' => $vendorDir . '/acrosswp/acrosswp-dependency/acrosswp-dependency.php',
'3df4360102c81a53e670d4e86766fc4d' => $vendorDir . '/acrosswp/acrosswp-buddyboss-dependency/acrosswp-buddyboss-dependency.php',
'93f9e6313381cd4cd1fbe0d54257582d' => $vendorDir . '/acrosswp/acrosswp-plugin-update/acrosswp-plugin-update.php',
'b808676c575d8cc3a144a9eb5971e0d9' => $vendorDir . '/acrosswp/acrosswp-plugin-update-checker-github/updater.php',
'b349d7d60283eaf7ede54e91833ccdc3' => $vendorDir . '/acrosswp/acrosswp-plugin-update-checker-github/acrosswp-plugin-update-checker-github.php',
);
2 changes: 1 addition & 1 deletion vendor/composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class ComposerStaticInit3d8045607f0036d8c234a09d5feb1958
'ba3e6311190fef6b803d614907261c88' => __DIR__ . '/..' . '/acrosswp/acrosswp-dependency/acrosswp-dependency.php',
'3df4360102c81a53e670d4e86766fc4d' => __DIR__ . '/..' . '/acrosswp/acrosswp-buddyboss-dependency/acrosswp-buddyboss-dependency.php',
'93f9e6313381cd4cd1fbe0d54257582d' => __DIR__ . '/..' . '/acrosswp/acrosswp-plugin-update/acrosswp-plugin-update.php',
'b808676c575d8cc3a144a9eb5971e0d9' => __DIR__ . '/..' . '/acrosswp/acrosswp-plugin-update-checker-github/updater.php',
'b349d7d60283eaf7ede54e91833ccdc3' => __DIR__ . '/..' . '/acrosswp/acrosswp-plugin-update-checker-github/acrosswp-plugin-update-checker-github.php',
);

public static $classMap = array (
Expand Down
10 changes: 5 additions & 5 deletions vendor/composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,24 +151,24 @@
"source": {
"type": "git",
"url": "https://github.com/acrosswp/acrosswp-plugin-update-checker-github.git",
"reference": "43933bdd6a4e46ce41d3b9427db4586f2d4ab39f"
"reference": "69567a282ebdb3d35964c3987d67dfde687331b4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/acrosswp/acrosswp-plugin-update-checker-github/zipball/43933bdd6a4e46ce41d3b9427db4586f2d4ab39f",
"reference": "43933bdd6a4e46ce41d3b9427db4586f2d4ab39f",
"url": "https://api.github.com/repos/acrosswp/acrosswp-plugin-update-checker-github/zipball/69567a282ebdb3d35964c3987d67dfde687331b4",
"reference": "69567a282ebdb3d35964c3987d67dfde687331b4",
"shasum": ""
},
"require": {
"yahnis-elsts/plugin-update-checker": "dev-master"
},
"time": "2023-11-30T07:35:22+00:00",
"time": "2024-02-13T14:20:54+00:00",
"default-branch": true,
"type": "library",
"installation-source": "dist",
"autoload": {
"files": [
"updater.php"
"acrosswp-plugin-update-checker-github.php"
]
},
"notification-url": "https://packagist.org/downloads/",
Expand Down
6 changes: 3 additions & 3 deletions vendor/composer/installed.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
'name' => 'acrosswp/pin-comment',
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'reference' => 'f84bce1c30abffe9348c88d5781c1ac28745e72b',
'reference' => '698ccf63ae7c742b6ff7c55b350f9fbeecdf4538',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Expand Down Expand Up @@ -46,7 +46,7 @@
'acrosswp/acrosswp-plugin-update-checker-github' => array(
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'reference' => '43933bdd6a4e46ce41d3b9427db4586f2d4ab39f',
'reference' => '69567a282ebdb3d35964c3987d67dfde687331b4',
'type' => 'library',
'install_path' => __DIR__ . '/../acrosswp/acrosswp-plugin-update-checker-github',
'aliases' => array(
Expand All @@ -57,7 +57,7 @@
'acrosswp/pin-comment' => array(
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'reference' => 'f84bce1c30abffe9348c88d5781c1ac28745e72b',
'reference' => '698ccf63ae7c742b6ff7c55b350f9fbeecdf4538',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Expand Down

0 comments on commit fbfe52f

Please sign in to comment.