Releases: YahnisElsts/plugin-update-checker
3.0
Breaking changes
This release includes a few changes that break backwards compatibility. In practice, most plugins will not be affected.
- Removed several class name aliases:
PluginUpdateChecker
,PluginUpdate
andPluginInfo
. Use the versioned class names instead, e.g.PluginUpdateChecker_3_0
. - Moved the
$checkPeriod
,$throttleRedundantChecks
,$throttledCheckPeriod
fields and themaybeCheckForUpdates()
method fromPluginUpdateChecker
to a new class calledPucScheduler
. - Removed the
$triggerErrors
parameter from thefromJson()
method. Now the update checker will always trigger a PHP notice if your metadata file does not contain valid JSON or is missing a required key.
Other changes
- Added basic i18n support. French and Hungarian translations have been added by contributors.
- Added an
isPluginBeingUpgraded()
method. It returnstrue
if the plugin is being updated right now. This can be useful for plugins that hook into WordPress core to change how WordPress installs updates. Caution: The method is not guaranteed to be accurate. - Fixed a GitHub integration bug where update installation sometimes didn't work when using a private GitHub repository.
- Fixed a rare issue with same-host restriction causing updates to fail.
- Fixed a "creating default object from empty value" notice when trying to parse invalid JSON.
- Replaced conditional calls to
admin_url()
/network_admin_url()
withself_admin_url()
. - The
debug-bar-plugin.php
file is now optional. If you're not using Debug Bar, you can remove the file and the library will keep working. Previously it would crash if the file was missing. - The status message that shows up after clicking "check for updates" can now be dismissed by clicking "x".
- Lots of refactoring.
2.2
- Fixed automatic directory renaming not working with the AJAX-based plugin update process that was introduced in WP 4.2.
- Improved compatibility with plugins that use custom upgrader skins.
2.1
- Added an optional
active_installs
field. This should be an positive integer that indicates how many sites use your plugin. WordPress will show it in the "view version 1.2.3 details" pop-up. For example, if you set it to 10000, users will see "Active Installs: 10,000+". - Added automatic directory structure validation. This should help developers identify and fix issues caused by putting all plugin files at the root of the update package. See acb8476 for more details.
- The update checker will no longer inadvertently trigger autoloading when calling
class_exists()
. Apparently, some autoloader implementations will throw warnings or even crash if they get a class name that they can't load.
2.0
-
Added experimental GitHub support. You can use the new
PucGitHubChecker
class to retrieve plugin updates from a GitHub repository. It can be configured to check either the latest release, the latest tag, or a specific branch. It will automagically extract version details (description, changelog, etc) from a number of different locations - release description, plugin headers,readme.txt
,changelog.md
and more. -
Added support for plugin banners. To use it, add a new key named "banners" to the metadata file. It should be a JSON object with two string properties: "low" and "high". "low" must be a fully qualified URL pointing to a 772x250 image (PNG or JPG). "high" must point to a 1544x500 image. Only one of "low" or "high" is required.
Example:
{ "banners" : { "low" : "//example.com/assets/banner-772x250.png", "high" : "//example.com/assets/banner-1544x500.png" } }
-
Fixed some duplicate HTML ids. See #26.
-
Added a workaround for situations where the currently installed version and the update package have different directory names. This can happen if you serve updates from a source like GitHub that generates different directory names for each branch/tag/etc.
-
The "slug" field of the metadata file is no longer used. The update checker will now ignore it and use the slug passed to the class constructor instead. If no slug is specified, it will generate a slug based on the plugin file name.
1.6.1
- Changed licensing from GNU GPL to the more permissive MIT License.
- Check for updates more often when the user visits certain admin pages or does a bulk install/update.
1.6
- Fixed background updates not working for plugins using this library.
- Added a
filename
property to thePluginInfo
andPluginUpdate
classes. It contains the plugin file name relative to the plugins directory (equivalent toPluginUpdateChecker::pluginFile
).
WordPress has supported background plugin updates since WP 3.7. Previously automatic updates didn't work with PUC even if explicitly enabled. This release adds basic support for that WP feature.
1.5
v1.5 Add a Composer manifest
1.3
Version 1.3