From 55effeb6a5bfcc61806a15f463ad4323f80228b9 Mon Sep 17 00:00:00 2001 From: Kevin Date: Sat, 23 Nov 2024 21:23:13 +0100 Subject: [PATCH] v 2.26.0 - Update dependencies - Fix translation loading. --- inc/WPUBaseUpdate/WPUBaseUpdate.php | 19 ++++++++++++++++--- wpuseo.php | 9 +++++---- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/inc/WPUBaseUpdate/WPUBaseUpdate.php b/inc/WPUBaseUpdate/WPUBaseUpdate.php index e5b8381..73bd16c 100644 --- a/inc/WPUBaseUpdate/WPUBaseUpdate.php +++ b/inc/WPUBaseUpdate/WPUBaseUpdate.php @@ -4,7 +4,7 @@ /* Class Name: WPU Base Update Description: A class to handle plugin update from github -Version: 0.5.0 +Version: 0.6.0 Class URI: https://github.com/WordPressUtilities/wpubaseplugin Author: Darklg Author URI: https://darklg.me/ @@ -176,7 +176,7 @@ public function plugins_api($res, $action, $args) { return false; } - if ('github-' . $this->github_project !== $args->slug) { + if ('github-' . $this->github_project !== $args->slug && $this->github_project !== $args->slug) { return $res; } @@ -185,7 +185,20 @@ public function plugins_api($res, $action, $args) { return (object) $plugin_info; } - return false; + $plugin_details = array( + 'name' => $this->github_project, + 'slug' => $this->github_project + ); + + $parent_plugin = __DIR__ . '/../../' . $this->github_project . '.php'; + if (file_exists($parent_plugin)) { + $plugin_name = get_plugin_data($parent_plugin); + if (isset($plugin_name['Name'])) { + $plugin_details['name'] = $plugin_name['Name']; + } + } + + return (object) $plugin_details; } diff --git a/wpuseo.php b/wpuseo.php index 34397ae..b3e1ae7 100644 --- a/wpuseo.php +++ b/wpuseo.php @@ -6,7 +6,7 @@ Plugin URI: https://github.com/WordPressUtilities/wpuseo Update URI: https://github.com/WordPressUtilities/wpuseo Description: Enhance SEO : Clean title, Nice metas, GDPR friendly Analytics. -Version: 2.25.2 +Version: 2.26.0 Author: Darklg Author URI: https://darklg.me/ Text Domain: wpuseo @@ -21,7 +21,7 @@ class WPUSEO { public $basetoolbox; - public $plugin_version = '2.25.2'; + public $plugin_version = '2.26.0'; private $active_wp_title = true; private $active_metas = true; private $fake_txt_files = array('ads', 'robots'); @@ -39,6 +39,9 @@ public function __construct() { add_action('init', array(&$this, 'init' )); + add_action('after_setup_theme', array(&$this, + 'load_translation' + )); } public function init() { @@ -47,8 +50,6 @@ public function init() { $this->active_metas = !apply_filters('wpuseo__disable__metas', false); $this->cookie_notice_tracking_feature_flag = apply_filters('wpuseo__cookie_notice_tracking_feature_flag', true); - $this->load_translation(); - // Ads add_action('wpuoptions__post_update', array(&$this, 'wpuoptions__post_update__update_fake_files'