Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jeffreyvr/wp-plugin-updater
https://github.com/jeffreyvr/wp-plugin-updater
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/jeffreyvr/wp-plugin-updater
- Owner: jeffreyvr
- License: mit
- Created: 2022-10-15T16:43:20.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-28T16:08:16.000Z (8 months ago)
- Last Synced: 2024-05-02T02:06:24.216Z (7 months ago)
- Language: PHP
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# WP Plugin Updater
Allows you to check for updates for a plugin on a different server then wordpress.org.
> 🚸 As long as this package is still in development, the API might be subject to change and should not considered stable. Use at your own risk.
Made for a specific use case which may not fit everybody's needs.
Based on the [example plugin](https://github.com/Make-Lemonade/lemonsqueezy-wp-updater-example) from LemonSqueezy.
## Example
```php
(new Jeffreyvr\WPPluginUpdater\WPPluginUpdater(
__FILE__, // plugin file path
'your-plugin/your-plugin.php',
'your-plugin',
'1.0',
"https://yourpluginsite.test/check-update",
"https://yourpluginsite.test/validate-license"
))->setCanCheck(function() {
// determine if check can be made
})
->setActions([
// classes should implement Jeffreyvr\WPPluginUpdater\Action interface
'activate-license' => ActivateLicenseAction::class,
'deactivate-license' => DeactivateLicenseAction::class,
'check-license' => CheckLicenseAction::class,
'check-update' => CheckUpdateAction::class
]);new \Jeffreyvr\WPPluginUpdater\Updater($this->updater);
```## Contributors
* [Jeffrey van Rossum](https://github.com/jeffreyvr)
* [All contributors](https://github.com/jeffreyvr/wp-meta-box/graphs/contributors)## License
MIT. Please see the [License File](/LICENSE) for more information.