Harvey Plum Newspack Updater self-updates
Updates Newspack plugins and themes from legacy repositories and newspack-workspace releases.
by Harvey Plum · github.com/harveyplum/harvey-plum-newspack-updater · website
Install
The author publishes release zips, so WP-CLI can install straight from GitHub:
wp plugin install https://github.com/harveyplum/harvey-plum-newspack-updater/releases/download/0.2.4/harvey-plum-newspack-updater-0.2.4.zipShips its own WordPress updater (built-in updater), so new versions show up under Dashboard → Updates.
Updates installed Newspack plugins and themes from either legacy component repositories or Automattic/newspack-workspace tags.
Description
This plugin adds update checks for these Newspack components:
- newspack-plugin, mapped to the
newspackworkspace tag prefix. - newspack-blocks, mapped to the
newspack-blocksworkspace tag prefix. - newspack-theme, mapped to the
newspack-themeworkspace tag prefix. - newspack-popups, mapped to the
newspack-popupsworkspace tag prefix. - newspack-newsletters, mapped to the
newspack-newslettersworkspace tag prefix. - newspack-ads, mapped to the
newspack-adsworkspace tag prefix.
The updater has two source modes:
- Unified newspack-workspace mode, which queries
Automattic/newspack-workspacereleases and tags. - Legacy mode, which queries the former individual component repositories.
GitHub-generated source zipballs are not used as install packages. WordPress is only offered a package when the updater finds a ready-to-use ZIP release asset or a matching ZIP URL in the configured manifest.
Theme updates use GitHub releases only, never tags, and prerelease theme releases are ignored.
The updater only makes managed packages appear in WordPress' normal update UI. It does not enable automatic updates for them.
Manifest Fallback
The optional manifest URL should return JSON. Either components or packages may be used as the top-level key, or the component map may be the top-level object.
Example:
{ "components": { "newspack-plugin": { "tag": "newspack-v5.0.0", "version": "5.0.0", "package_url": "https://example.com/newspack-plugin-5.0.0.zip" }, "newspack-blocks": { "tag": "newspack-blocks-v5.0.0", "package_url": "https://example.com/newspack-blocks-5.0.0.zip" } } }
Supported package fields are package_url, package, zip, download_url, or url. Supported tag fields are tag or tag_name.
Changelog
0.2.4
- Added GitHub update metadata and standardized Harvey Plum branding.
- Restricted manifests, API requests, and update packages to validated public HTTPS URLs.
- Switched remote JSON requests to WordPress safe HTTP handling.
0.2.3
- Clear stale updater and WordPress update transients when the updater is activated or refreshed.
- Match each installed Newspack child theme to its own ZIP asset from the latest stable theme release.
- Add a Katharine/Katherine slug alias while still targeting the official
newspack-katharine.zipasset.
0.2.2
- Add normal update entries for every installed Newspack parent or child theme variant.
- Detect Newspack child themes by stylesheet and by parent template.
- Prevent managed plugins and themes from being automatically updated by this updater.
0.2.1
- Resolve update package URLs for the actual installed plugin or theme target.
- Add Newspack theme variant stylesheets such as Joseph, Katharine, Nelson, Sacha, and Scott.
- Use non-prerelease GitHub releases only for theme updates.
0.2.0
- Add workspace mode for
Automattic/newspack-workspace. - Keep legacy individual repository mode.
- Add component tag-prefix matching and installed package mapping.
- Add cached GitHub/manifest discovery with settings-page debug output.
- Require ready-to-use ZIP packages from release assets or manifest fallback.
Releases
1 release. Each count is every asset in that release; expand a row for the breakdown.