diff --git a/README.md b/README.md index d536436..09d033f 100644 --- a/README.md +++ b/README.md @@ -209,6 +209,29 @@ The plugin works by: 3. Adding helpful notifications near error messages 4. Providing a secure method to remove plugin references from the database +### Git Updater Integration + +This plugin is designed to work seamlessly with the Git Updater plugin for updates from GitHub and Gitea. To ensure proper integration: + +1. **Required Headers**: The plugin includes specific headers in the main plugin file that Git Updater uses to determine update sources and branches: + ```php + * GitHub Plugin URI: wpallstars/wp-fix-plugin-does-not-exist-notices + * GitHub Branch: main + * Primary Branch: main + * Release Branch: main + * Release Asset: true + * Gitea Plugin URI: https://gitea.wpallstars.com/wpallstars/wp-fix-plugin-does-not-exist-notices + * Gitea Branch: main + ``` + +2. **Tagging Releases**: When creating a new release, always tag it with the 'v' prefix (e.g., `v2.2.0`) to ensure GitHub Actions can create the proper release assets. + +3. **GitHub Actions**: The repository includes a GitHub Actions workflow that automatically builds the plugin and creates a release with the .zip file when a new tag is pushed. + +4. **Update Source Selection**: The plugin includes a feature that allows users to choose their preferred update source (WordPress.org, GitHub, or Gitea). + +For more information on Git Updater integration, see the [Git Updater Required Headers documentation](https://git-updater.com/knowledge-base/required-headers/). + ## Changelog ### 2.2.0 diff --git a/includes/Plugin.php b/includes/Plugin.php index 62fb323..deb2aca 100644 --- a/includes/Plugin.php +++ b/includes/Plugin.php @@ -143,10 +143,16 @@ class Plugin { * Initialize Git Updater fixes * * This function adds filters to fix Git Updater's handling of 'main' vs 'master' branches + * Note: This fix is commented out as we're now using the proper plugin headers instead. + * See: https://git-updater.com/knowledge-base/required-headers/ * * @return void */ private function init_git_updater_fixes() { + // These fixes are no longer needed with proper plugin headers + // Keeping the code commented for reference + + /* // Fix for Git Updater looking for 'master' branch instead of 'main' add_filter('gu_get_repo_branch', array($this, 'override_branch'), 999, 3); @@ -161,6 +167,7 @@ class Plugin { // Fix for Git Updater API responses add_filter('gu_api_repo_type_data', array($this, 'override_repo_type_data'), 999, 3); + */ } /** diff --git a/wp-fix-plugin-does-not-exist-notices.php b/wp-fix-plugin-does-not-exist-notices.php index 24f76c6..100601b 100644 --- a/wp-fix-plugin-does-not-exist-notices.php +++ b/wp-fix-plugin-does-not-exist-notices.php @@ -15,8 +15,14 @@ * Primary Branch: main * Release Branch: main * Release Asset: true + * Requires at least: 5.0 + * Requires PHP: 7.0 * Update URI: https://github.com/wpallstars/wp-fix-plugin-does-not-exist-notices * + * Gitea Plugin URI: https://gitea.wpallstars.com/wpallstars/wp-fix-plugin-does-not-exist-notices + * Gitea Branch: main + * Gitea Languages: languages + * * @package WPALLSTARS\FixPluginDoesNotExistNotices */