Updated package updater

This commit is contained in:
Cooper Dalrymple
2025-07-22 10:05:01 -05:00
parent b51a286e4b
commit 75334270f0
5 changed files with 65 additions and 10 deletions

View File

@@ -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');