From 75334270f04049389bba154aa725275b68fbb0e9 Mon Sep 17 00:00:00 2001 From: Cooper Dalrymple Date: Tue, 22 Jul 2025 10:05:01 -0500 Subject: [PATCH] Updated package updater --- .gitignore | 2 ++ Makefile | 2 ++ composer.json | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ ogrealert.php | 18 +++++++++--------- readme.txt | 5 ++++- 5 files changed, 65 insertions(+), 10 deletions(-) create mode 100644 composer.json diff --git a/.gitignore b/.gitignore index 2a94ae4..04ac011 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,5 @@ /OgreAlert ogrealert.zip lib +composer.lock +vendor diff --git a/Makefile b/Makefile index 36afa34..6eba3b2 100644 --- a/Makefile +++ b/Makefile @@ -17,6 +17,8 @@ copy: cp -f ./* $(DIR) || true rm $(DIR)/Makefile + rm $(DIR)/composer.json + rm $(DIR)/composer.lock rm $(DIR)/$(SLUG).zip || true rm -r $(DIR)/assets/sass/lib diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..b7dc799 --- /dev/null +++ b/composer.json @@ -0,0 +1,48 @@ +{ + "$schema": "https://getcomposer.org/schema.json", + "name": "cleverogre/ogre-alert", + "version": "0.2.0", + "title": "OgreAlert", + "description": "OgreAlert is a plugin developed by CleverOgre in Pensacola, Florida.", + "author": "CleverOgre", + "license": "GPL-2.0+", + "keywords": [ + "WordPress", + "Plugin", + "Alert", + "Banner" + ], + "homepage": "https://cleverogre.com", + "repositories": { + "wp-package-updater": { + "type": "package", + "package": { + "name": "froger-me/wp-package-updater", + "version": "1.4.0", + "source": { + "url": "https://github.com/froger-me/wp-package-updater.git", + "type": "git", + "reference": "master" + } + } + }, + "wpackagist": { + "type": "composer", + "url": "https://wpackagist.org", + "only": [ + "wpackagist-plugin/*", + "wpackagist-theme/*" + ] + } + }, + "require": { + "yahnis-elsts/plugin-update-checker": "^5.0", + "froger-me/wp-package-updater": "^1.4.0", + "magicoli/wp-package-updater-lib": "^0.1.9" + }, + "scripts": { + "post-update-cmd": [ + "php vendor/magicoli/wp-package-updater-lib/install.php" + ] + } +} diff --git a/ogrealert.php b/ogrealert.php index cf8cc5f..20ff48b 100644 --- a/ogrealert.php +++ b/ogrealert.php @@ -3,7 +3,7 @@ Plugin Name: OgreAlert Plugin URI: https://plugins.cleverogre.com/plugin/ogrealert/ Description: OgreAlert is a plugin developed by CleverOgre in Pensacola, Florida. -Version: 0.1.9 +Version: 0.2.0 Author: CleverOgre Author URI: https://cleverogre.com/ Icon1x: https://plugins.cleverogre.com/plugin/ogrealert/?asset=icon-sm @@ -45,20 +45,20 @@ class Plugin { // Default Settings \OgreAlert\Settings::set('name', 'OgreAlert'); - \OgreAlert\Settings::set('version', '0.1.9'); + \OgreAlert\Settings::set('version', '0.2.0'); \OgreAlert\Settings::set('capability', 'edit_posts'); \OgreAlert\Settings::set('path', $path); \OgreAlert\Settings::set('dir', self::get_dir(__FILE__)); \OgreAlert\Settings::set('hook', self::get_hook(__FILE__)); // Setup Plugin Updates - include_once(\OgreAlert\Settings::get('path') . 'lib/wp-package-updater/class-wp-package-updater.php'); // Include private plugin updating library - $package_updater = new \WP_Package_Updater( - 'https://plugins.cleverogre.com', - wp_normalize_path(__FILE__), - wp_normalize_path(plugin_dir_path(__FILE__)), - false // License key not necessary - ); + global $wppul_server, $wppul_license_required, $wppul_plugin_file; + $wppul_server = 'https://plugins.cleverogre.com'; + $wppul_license_required = false; + $wppul_plugin_file = __FILE__; + $dir = trailingslashit(dirname(__FILE__)); + require_once($dir . 'lib/wp-package-updater-lib/plugin-update-checker/plugin-update-checker.php'); + require_once($dir . 'lib/wp-package-updater-lib/package-updater.php'); // Set Text Domain load_plugin_textdomain('ogrealert', false, plugin_basename(dirname(__FILE__)) . '/lang'); diff --git a/readme.txt b/readme.txt index 548ab82..ac12699 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Donate link: https://cleverogre.com/ Tags: development, warning, modal, dismissable Requires at least: 4.8.0 Tested up to: 5.7.1 -Stable tag: 0.1.9 +Stable tag: 0.2.0 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html @@ -62,6 +62,9 @@ By default, the OgreAlert plugin will be able to update without an activated lic == Changelog == += 0.2.0 - 07-22-2025 = +* DEV: Updated plugin updater libraries. + = 0.1.9 - 05-24-2021 = * NEW: Z-index field in OgreAlert settings. * BUG: Replaced wp_make_content_images_responsive filter with wp_filter_content_tags for WP 5.5.0 compatibility.