Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
e1da072640 | |||
b988fbbec0 | |||
ac3e47a147 | |||
b05d01da92 |
16
.github/workflows/release.yml
vendored
16
.github/workflows/release.yml
vendored
@ -28,7 +28,21 @@ jobs:
|
|||||||
cp readme.txt build/wp-fix-plugin-does-not-exist-notices/
|
cp readme.txt build/wp-fix-plugin-does-not-exist-notices/
|
||||||
cp LICENSE build/wp-fix-plugin-does-not-exist-notices/
|
cp LICENSE build/wp-fix-plugin-does-not-exist-notices/
|
||||||
cp README.md build/wp-fix-plugin-does-not-exist-notices/
|
cp README.md build/wp-fix-plugin-does-not-exist-notices/
|
||||||
cp -r assets build/wp-fix-plugin-does-not-exist-notices/
|
cp -r admin build/wp-fix-plugin-does-not-exist-notices/
|
||||||
|
cp -r includes build/wp-fix-plugin-does-not-exist-notices/
|
||||||
|
|
||||||
|
# Copy directories if they exist
|
||||||
|
if [ -d "assets" ]; then
|
||||||
|
cp -r assets build/wp-fix-plugin-does-not-exist-notices/
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -d "languages" ]; then
|
||||||
|
cp -r languages build/wp-fix-plugin-does-not-exist-notices/
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -d ".wordpress-org" ]; then
|
||||||
|
cp -r .wordpress-org build/wp-fix-plugin-does-not-exist-notices/
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Create ZIP file
|
- name: Create ZIP file
|
||||||
run: |
|
run: |
|
||||||
|
23
README.md
23
README.md
@ -209,6 +209,29 @@ The plugin works by:
|
|||||||
3. Adding helpful notifications near error messages
|
3. Adding helpful notifications near error messages
|
||||||
4. Providing a secure method to remove plugin references from the database
|
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
|
## Changelog
|
||||||
|
|
||||||
### 2.2.0
|
### 2.2.0
|
||||||
|
@ -143,10 +143,16 @@ class Plugin {
|
|||||||
* Initialize Git Updater fixes
|
* Initialize Git Updater fixes
|
||||||
*
|
*
|
||||||
* This function adds filters to fix Git Updater's handling of 'main' vs 'master' branches
|
* 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
|
* @return void
|
||||||
*/
|
*/
|
||||||
private function init_git_updater_fixes() {
|
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'
|
// Fix for Git Updater looking for 'master' branch instead of 'main'
|
||||||
add_filter('gu_get_repo_branch', array($this, 'override_branch'), 999, 3);
|
add_filter('gu_get_repo_branch', array($this, 'override_branch'), 999, 3);
|
||||||
|
|
||||||
@ -161,6 +167,7 @@ class Plugin {
|
|||||||
|
|
||||||
// Fix for Git Updater API responses
|
// Fix for Git Updater API responses
|
||||||
add_filter('gu_api_repo_type_data', array($this, 'override_repo_type_data'), 999, 3);
|
add_filter('gu_api_repo_type_data', array($this, 'override_repo_type_data'), 999, 3);
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -15,8 +15,14 @@
|
|||||||
* Primary Branch: main
|
* Primary Branch: main
|
||||||
* Release Branch: main
|
* Release Branch: main
|
||||||
* Release Asset: true
|
* 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
|
* 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
|
* @package WPALLSTARS\FixPluginDoesNotExistNotices
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user