plugin-update-checker

A custom update checker for WordPress plugins. Useful if you don't want to host your project in the official WP repository, but would still like it to support automatic updates. Despite the name, it also works with themes.

MIT License

Downloads
895.6K
Stars
2.2K
Committers
39

Bot releases are visible (Hide)

plugin-update-checker - 4.3

Published by YahnisElsts almost 7 years ago

  • 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".
  • Added support for alternative readme.txt capitalisations. Most plugins use a lowercase name, but there are some that call this file README.txt or README.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.
plugin-update-checker - 4.2

Published by YahnisElsts about 7 years ago

  • 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 or puc_request_metadata_http_result_theme-$slug.
    • Basic example:
      $updateChecker->addFilter('request_metadata_http_result', function($response) {
          return $response;
      });
      
  • 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).
plugin-update-checker - 4.1

Published by YahnisElsts over 7 years ago

  • 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) and locale (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.
plugin-update-checker - 4.0.3

Published by YahnisElsts over 7 years ago

  • 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.
plugin-update-checker - 4.0.2

Published by YahnisElsts almost 8 years ago

  • Fixed error "cannot redeclare class Puc_v4_Autoloader".
plugin-update-checker - 4.0.1

Published by YahnisElsts almost 8 years ago

  • 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 or v0.0.1).
  • Fixed pre-4.7 WordPress compatibility.
  • Fixed a stupid typo that broke PUC localization. Props to @rvola.
plugin-update-checker - 4.0

Published by YahnisElsts almost 8 years ago

New features

  • Theme updates.
  • BitBucket support.

Breaking changes

  • Renamed PucFactory to Puc_v4_Factory. Use Puc_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. Use Puc_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. Use setAuthentication('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() or add_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.
plugin-update-checker - 3.2

Published by YahnisElsts almost 8 years ago

  • 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 calling PucFactory::buildUpdateChecker or creating a PluginUpdateChecker instance.
plugin-update-checker - 3.1

Published by YahnisElsts over 8 years ago

  • 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 to 4.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.
plugin-update-checker - 3.0

Published by YahnisElsts over 8 years ago

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 and PluginInfo. Use the versioned class names instead, e.g. PluginUpdateChecker_3_0.
  • Moved the $checkPeriod, $throttleRedundantChecks, $throttledCheckPeriod fields and the maybeCheckForUpdates() method from PluginUpdateChecker to a new class called PucScheduler.
  • Removed the $triggerErrors parameter from the fromJson() 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 returns true 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() with self_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.
plugin-update-checker - 2.2

Published by YahnisElsts about 9 years ago

  • 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.
plugin-update-checker - 2.1

Published by YahnisElsts over 9 years ago

  • 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 acb8476be2e91506fe863ad385c05f4b16b9fb40 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.
plugin-update-checker - 2.0

Published by YahnisElsts over 9 years ago

  • 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.

plugin-update-checker - 1.6.1

Published by YahnisElsts almost 10 years ago

  • 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.
plugin-update-checker - 1.6

Published by YahnisElsts almost 10 years ago

  • Fixed background updates not working for plugins using this library.
  • Added a filename property to the PluginInfo and PluginUpdate classes. It contains the plugin file name relative to the plugins directory (equivalent to PluginUpdateChecker::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.

plugin-update-checker - 1.5

Published by YahnisElsts about 10 years ago

plugin-update-checker - 1.3

Published by YahnisElsts over 11 years ago

Version 1.3

Package Rankings
Top 0.55% on Packagist.org
Related Projects