@YahnisElsts YahnisElsts released this Dec 22, 2017 · 40 commits to master since this release

Assets 2
  • Added a way to show a plugin icon on the "Dashboard -> Updates" page.
    Usage: Add the following entry to your JSON file:
    "icons" : {
    	"1x" : "http://example.com/assets/icon-128x128.png",
    	"2x" : "http://example.com/assets/icon-256x256.png",
    	"svg": "http://example.com/assets/icon.svg"
    } 
    See supported icon sizes and image formats.
  • Added support for GitHub release assets.
    Usage: Set up the update checker instance as usual, then call the new enableReleaseAssets() method of the GitHub API class.
    $gitHubUpdateChecker->getVcsApi()->enableReleaseAssets();
    You can make PUC look for a specific asset by passing a regular expression to enableReleaseAssets(). For example, $api->enableReleaseAssets('/custom-asset/') will make PUC use the first asset where the file name contains the string "custom-asset".
  • Improved error reporting when using the "check for updates" link. Previously, the check could fail with a generic message like "no updates available". Now the update checker will display the underlying API error (if available).

@YahnisElsts YahnisElsts released this Nov 3, 2017 · 48 commits to master since this release

Assets 2

This is a hotfix to remove some debug logging code that was accidentally left in the 4.3 release.

4.3

@YahnisElsts YahnisElsts released this Nov 3, 2017 · 49 commits to master since this release

Assets 2
  • 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.
4.2

@YahnisElsts YahnisElsts released this Jul 22, 2017 · 94 commits to master since this release

Assets 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 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:
4.1

@YahnisElsts YahnisElsts released this Apr 7, 2017 · 117 commits to master since this release

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

@YahnisElsts YahnisElsts released this Jan 30, 2017 · 130 commits to master since this release

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

@YahnisElsts YahnisElsts released this Jan 13, 2017 · 137 commits to master since this release

Assets 2
  • Fixed error "cannot redeclare class Puc_v4_Autoloader".

@YahnisElsts YahnisElsts released this Jan 13, 2017 · 138 commits to master since this release

Assets 2
  • 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.
4.0

@YahnisElsts YahnisElsts released this Jan 11, 2017 · 144 commits to master since this release

Assets 2

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

@YahnisElsts YahnisElsts released this Dec 8, 2016 · 189 commits to master since this release

Assets 2
  • Fixed parsing of "= version =" headers in readme.txt.
  • Added and updated translations:
  • 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.