diff --git a/.github/workflows/js.yml b/.github/workflows/js.yml index 301b432..d3191e8 100644 --- a/.github/workflows/js.yml +++ b/.github/workflows/js.yml @@ -10,7 +10,7 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install modules run: npm install -g eslint@^8 - name: Run ESLint diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index c55b4e3..aa092ae 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -13,7 +13,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: PHP Lint uses: michaelw90/PHP-Lint@2.1.0 diff --git a/inc/WPUBaseUpdate/WPUBaseUpdate.php b/inc/WPUBaseUpdate/WPUBaseUpdate.php index 49683e5..c5a1caa 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/wpupostmetas.php b/wpupostmetas.php index 0aa57e3..e578b9b 100644 --- a/wpupostmetas.php +++ b/wpupostmetas.php @@ -5,7 +5,7 @@ Plugin URI: https://github.com/WordPressUtilities/wpupostmetas Update URI: https://github.com/WordPressUtilities/wpupostmetas Description: Simple admin for post metas -Version: 0.33.0 +Version: 0.33.1 Author: Darklg Author URI: https://darklg.me/ Text Domain: wpupostmetas @@ -23,7 +23,7 @@ class WPUPostMetas { public $qtranslatex; public $qtranslate; - public $version = '0.33.0'; + public $version = '0.33.1'; public $boxes = array(); public $fields = array(); public $settings_update; @@ -42,7 +42,7 @@ public function __construct() { if (!is_admin()) { return; } - add_action('plugins_loaded', array(&$this, + add_action('after_setup_theme', array(&$this, 'load_plugin_textdomain' )); add_action('add_meta_boxes', array(