Releases: YahnisElsts/plugin-update-checker
4.3.1
This is a hotfix to remove some debug logging code that was accidentally left in the 4.3 release.
4.3
- Added GitLab support. Props to @aaronkirkham.
- Added a "View details" plugin meta link that functions just like the details link that WordPress shows when an update is available. Props to @Mikk3lRo.
- You can change the link text by using the
puc_view_details_link-$slug
filter. Return an empty string to remove the link. - You can change the position of the link relative to the "Visit plugin site" link by using the
puc_view_details_link_position-$slug
filter. Valid return values are "before", "after", "replace", and "append".
- You can change the link text by using the
- Added support for alternative
readme.txt
capitalisations. Most plugins use a lowercase name, but there are some that call this fileREADME.txt
orREADME.TXT
. This was an issue when trying to retrieve the readme from a VCS repository. - Added Swedish translation. Props to @dylanmoller.
- Added Danish translation. Props to @Mikk3lRo.
- Fixed two compatibility issues with WordPress 3.8 and other old WordPress versions. Props to @DavidAnderson684.
- Fixed a potential fatal error when uninstalling a plugin that uses
register_uninstall_hook()
. - Fixed a false positive PHP 7 compatibility error that was being reported by the "PHP Compatibility Checker" plugin. Props to @anugupta.
- Fixed a few spelling errors and documentation errors.
4.2
- Added the GitHub API response to the
Vcs_Reference
instance as an$apiResponse
property. - Added a new filter that lets you filter the HTTP response returned by
wp_remote_get()
.- Base filter name:
request_metadata_http_result
- Full filter name for use with
add_filter()
:puc_request_metadata_http_result-$slug
orpuc_request_metadata_http_result_theme-$slug
. - Basic example:
$updateChecker->addFilter('request_metadata_http_result', function($response) { return $response; });
- Base filter name:
- Fixed an issue with Debug Bar 0.9 that caused some PUC panels to look empty.
- Suppressed warnings about
set_time_limit()
being disabled. Changing the limit can be useful when you're on a slow network connection, but normally the library works fine with the default limits. - Added and updated translations:
- Czech (props to @Pryx).
- French (props to @rvola).
- Japanese (props to @GoodMorningCall).
- Portuguese Brazilian (props to @iiandrade).
4.1
- Added support for the Composer autoloader.
- Added Japanese translation. Props to @GoodMorningCall.
- Added plugin name to the status notices that appear when manually checking for updates. Props to @RichardCoffee. Note: As a side-effect, most translations are out of date.
- Added
php
(PHP version) andlocale
(WordPress locale) to query parameters that are sent when checking for updates. This only applies to projects using JSON metadata. - Fixed a rare error where theme vs plugin detection could fail on sites that use AMP.
4.0.3
- Added Italian translation. Props to @LDAV.
- Fixed downloads from private GitHub repositories.
- Fixed a bug that caused plugins located outside the WordPress plugin directory (i.e. using symlinks) to be treated as themes.
- Fixed a BitBucket integration bug that could make PUC pick the wrong version tag when the repository had more than 10 tags.
4.0.2
- Fixed error "cannot redeclare class Puc_v4_Autoloader".
4.0.1
- Fixed "PCLZIP_ERR_BAD_FORMAT" error when installing an update from a private BitBucket repository.
- Fixed a version parsing bug that caused the update checker to ignore GitHub/BitBucket tags with more than two components (e.g.
1.0.2
orv0.0.1
). - Fixed pre-4.7 WordPress compatibility.
- Fixed a stupid typo that broke PUC localization. Props to @rvola.
4.0
New features
- Theme updates.
- BitBucket support.
Breaking changes
-
Renamed
PucFactory
toPuc_v4_Factory
. UsePuc_v4_Factory::buildUpdateChecker()
to initialize the update checker. -
Renamed all classes to comply with the PSR-0 autoloading standard.
-
Changed how the factory deals with multiple versions of the library being loaded at the same time. Instead of simply choosing the highest available version, it now uses the highest minor version. For example, version 4.0 of the factory class can build version 4.5 or 4.9.1 instances, but not version 5.0. The goal of this change is to reduce the risk that future releases could accidentally break plugins that are using old versions of the library.
-
GitHub support: The class
PucGitHubChecker_x_y
was removed. UsePuc_v4_Factory::buildUpdateChecker()
instead and pass the repository URL as the first argument. Example:$updateChecker = Puc_v4_Factory::buildUpdateChecker( 'https://github.com/username/repository', __FILE__ );
-
GitHub support: The
setAccessToken()
method was deprecated. UsesetAuthentication('token_here')
instead. -
As part of theme support, the plugin info and update container classes were refactored and two base classes (
Puc_v4_Metadata
,Puc_v4_Update
) were introduced. If your plugin extends the update class, review the changes to see if you need to update your code.
Minor changes
- Switched to using autoloading instead of
require
. - Added example metadata files (JSON) for plugins and themes. Look for them in the
examples
directory. - Added lots of new classes. There are many minor differences between how plugins and themes work, so PUC has several cases of "general base class + two specialized subclasses".
- The names of internal filters are slightly different for plugins and themes. This only matters if you're setting hooks via
add_filter()
oradd_action()
. I recommend using the$updateChecker->addFilter()
method instead which will automatically append the right suffix and slug.- Plugins:
puc_something-$slug
. - Themes:
puc_something_theme-$slug
.
- Plugins:
3.2
- Fixed parsing of "= version =" headers in readme.txt.
- Added and updated translations:
- German. Props to @ilueckel.
- French. Props to @rvola.
- Persian Props to @Pro-Style.
- Duplicate plugin slugs will now trigger a fatal error if
WP_DEBUG
is enabled. To prevent that, specify a unique slug when callingPucFactory::buildUpdateChecker
or creating aPluginUpdateChecker
instance.
3.1
- Added basic support for translation updates. This feature is also known as "language packs". See the "translations" entry in the supported field list for details.
- WordPress 4.5 will now correctly display the "Compatibility with WordPress 4.5: 100% (according to its author)" line for your plugin if you set the
tested
field to4.5
or above. - Fixed some notices and compatibility issues related to PHP 7. Props to @lengthofrope, see #56 and #57.
- Fixed a crash when running version 3.x together with version 2.x or lower while Debug Bar is active.