Skip to content

Commit

Permalink
v 2.26.0
Browse files Browse the repository at this point in the history
- Update dependencies
- Fix translation loading.
  • Loading branch information
Darklg committed Nov 23, 2024
1 parent ebef728 commit 55effeb
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 7 deletions.
19 changes: 16 additions & 3 deletions inc/WPUBaseUpdate/WPUBaseUpdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down Expand Up @@ -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;
}

Expand All @@ -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;

}

Expand Down
9 changes: 5 additions & 4 deletions wpuseo.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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');
Expand All @@ -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() {
Expand All @@ -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'
Expand Down

0 comments on commit 55effeb

Please sign in to comment.