Fix namespace issues in Updater.php
Some checks failed
ci/woodpecker/push/woodpecker Pipeline is pending
ci/woodpecker/tag/woodpecker Pipeline is pending
Build Release / Build and Create Release (push) Has been cancelled
Build Release / Deploy to WordPress.org (push) Has been cancelled

This commit is contained in:
2025-04-12 01:20:15 +01:00
parent 35534aa246
commit 0a98ba8c2e

View File

@ -79,7 +79,7 @@ class Updater {
*/ */
private function is_github_installation() { private function is_github_installation() {
// Check for GitHub-specific markers in the plugin directory // Check for GitHub-specific markers in the plugin directory
$plugin_dir = plugin_dir_path($this->plugin_file); $plugin_dir = \plugin_dir_path($this->plugin_file);
// Look for .git directory with GitHub remote // Look for .git directory with GitHub remote
if (file_exists($plugin_dir . '.git')) { if (file_exists($plugin_dir . '.git')) {
@ -104,7 +104,7 @@ class Updater {
*/ */
private function is_gitea_installation() { private function is_gitea_installation() {
// Check for Gitea-specific markers in the plugin directory // Check for Gitea-specific markers in the plugin directory
$plugin_dir = plugin_dir_path($this->plugin_file); $plugin_dir = \plugin_dir_path($this->plugin_file);
// Look for .git directory with Gitea remote // Look for .git directory with Gitea remote
if (file_exists($plugin_dir . '.git')) { if (file_exists($plugin_dir . '.git')) {
@ -135,7 +135,7 @@ class Updater {
} }
// Set the update server based on the installation source // Set the update server based on the installation source
add_filter('gul_update_server', function() { \add_filter('gul_update_server', function() {
if ($this->source === 'github') { if ($this->source === 'github') {
return 'https://github.com/wpallstars/fix-plugin-does-not-exist-notices'; // GitHub repository URL return 'https://github.com/wpallstars/fix-plugin-does-not-exist-notices'; // GitHub repository URL
} elseif ($this->source === 'gitea') { } elseif ($this->source === 'gitea') {