Update Manager for ClassicPress

With the Update Manager plugin for ClassicPress, developers can push plugin and theme updates out to their end users with ease! This isn't a fork of a WordPress plugin – this is a brand new plugin built specifically for ClassicPress!

Remote Updates made Easy

No matter where you host your plugin or theme code – GitHub, BitBucket, AWS, or even your own website – the Update Manager plugin makes quick work of pushing updates to your end users. A fantastic tool for plugin and theme developers, agencies, and freelancers!

Simple & Lightweight

The Update Manager only requires that you add a single file to your plugin or theme – and it's under 30k! There's no libraries to think about. There's no huge files to add bloat. There's no complicated steps to trip you up! And, best of all, your users don't have to install an extra plugin just to deal with updates.

Complete Integration

The Update Manager plugin is fully integrated with ClassicPress' core update process. Adding your own icons, banners, and screenshots is as simple as dropping your images into the right directory. When your users click for information about your plugin in their dashboard, the popup windows look fantastic, complete with details, imagery, changelog, reviews...and more! Themes look great, too!

Screenshots

A beautifully native experience!
Include your own branding!
Build on what you already have!
Testing updates is easy!

Frequently Asked Questions

How is this different than other updater plugins?

Unlike other updaters, your users won’t have to install an extra plugin just to handle updates. Additionally, you can add your own images just by dropping them into the right places. The Update Manager plugin is tightly integrated with the update process, so, you won’t see missing bits of data here and there. And, it’s the only one written specifically for ClassicPress. The code is exceptionally documented and it is written in namespaced, object-oriented PHP to ensure maximum encapsulation. In short: this is a Code Potent production, baby!

How does the Update Manager plugin accommodate GDPR?

When your end user’s sites check for updates, data is sent to your installation of the Update Manager plugin. This includes data such as the requesting URL, information from plugin header files, and URLs for any images related to the plugin (such as the icon, banner, and screenshots.) The data is used in memory and is not captured, stored, or tracked in any way. While this information is not necessarily sensitive or personally identifying, it is still a good idea to disclose it in your Privacy Policy. If you visit the Privacy page for your ClassicPress site, (Dashboard > Settings > Privacy) you will find complete details on the data received, how it is used, and some ideas for how you might update your Privacy Policy.

How do I make my plugin’s popup window and tabs look like what you did here?

Copy this endpoint data and paste it into your endpoint editor. From there, it’s just a matter of adjusting the values in the header section, customizing your texts and images, and removing any sections you don’t need.

Will my users have to install anything more than my own plugin(s)?

No. You’ll include one tiny file within your plugin and that’s it.

How much weight will this add to my plugin(s)?

The update client file is about 30k.

Where can I serve my updated files from?

You can host your plugin or theme update files wherever you like. Serve them from GitHub. Serve them from the cloud. Serve them from your own ClassicPress Media Library. Any web-accessible location is fine.

Can the Update Manager plugin force automatic updates on end users?

While you can make an update available, it is your end users’ decision on whether or not to update. If some of your end users have configured their own sites to receive automatic updates, then the updates will be automatically applied. This is a core feature, rather than functionality specific to the Update Manager plugin.

Can I push updates for a plugin or theme that is not actually installed on my own site?

Yes. The Update Manager plugin (which is installed on your site) gathers the data (that you saved in the editor) and spits it out as an endpoint like this – it doesn’t matter if the particular plugin or theme is actually installed or not.

If Code Potent pushes an update for the Update Manager plugin, will I have to update my own remote plugins and themes, too, as a result?

If the UpdateClient.class.php file is changed in some way, then, yes, you would want to update that file in your remote plugins, as well. However, that code is pretty solid and I don’t anticipate changes to that file anytime soon. Changes made to any/all other files in the Update Manager plugin will not have any impact.

Help! I updated a plugin or theme and it still shows an update is available!

This will occur if you forget to bump the version number in the primary PHP file of your plugin (or the style.css file if it’s a theme). Essentially, you’re updating your plugin (or theme) to the very same version of itself (as far as the system is concerned.) Hence, the update notification persists. To resolve the issue, bump the version number in plugin’s header or (or style.css if it’s a theme), rezip it, and apply the update one last time.

I’m getting PCLZIP_ERR_BAD_FORMAT – why is that?

  • the Download link field is not pointing to an actual zip file, or
  • the zip file is corrupt or incomplete, or
  • you have error reporting enabled and your plugin or theme triggered an error during the installation process, corrupting the data., or
  • you are on Safari and it is auto-unzipping files, which may cause a corruption.

Are there any issues pushing updates from a localhost?

If you are running Update Manager on a localhost, you wouldn’t be able to push updates to the live web. However, you could push updates to other plugins that are also on the localhost (even if they’re in a different ClassicPress installation.) An issue that may arise, though – if you are using HTTPS without a valid SSL certificate, the connection may be refused by your server. The only thing you’d "see" is that the update didn’t seem to be working. To solve this, you can either add a valid SSL certificate to your localhost (harder), or, configure your ClassicPress to use HTTP (easier) in your settings. If you opt for allowing HTTP connections, be sure you don’t have a security plugin or .htaccess directive forcing HTTP to HTTPS, otherwise it still wouldn’t work.

Changelog

Version 2.0.0

MAR-15-2020

  1. Replace base64-encoded SVG images with raw SVG images; issue #26.
  2. Update method of retrieving site; issue #30.
  3. Return empty result if site_url parameter is missing from request; issue #31.
  4. Strip PHP tags from code sections; issue #32.
  5. Prevent endpoint being saved without an identifier; issue #33.
  6. Add support for remote theme updates; issue #34.
  7. Reduce timeout duration in Update Client; issue #36.
  8. Store current ClassicPress version as a transient; issue #37.
  9. Remove extraneous commas; issue 38.
  10. Remove constants from UpdateClient class; issue 39.
  11. Fix undefined index in endpoint classes; issue 40.
  12. Add version numbers and last-updated date to admin rows; issue 41.
  13. Add sorting to more admin row columns; issue 42.
  14. Add download links to admin rows; issue 43.
  15. Remove text domain from UpdateClient class; issue 44.
  16. Add filter for extension author footer link; issue 45.
  17. Add filter for notification emails; issue 46.
  18. Reduce HTTP requests when polling for updates; issue 47.
  19. Replace constants file; issue 48.
  20. Add transient discovery/deletion functionality; issue 49.
  21. Update UPDATE_SERVER url; issue 50.

Version 1.0.1

JAN-08-2020

  1. Fix incorrect use of constant; issue #24.

Version 1.0.0

JAN-07-2020

  1. Add filters for image storage path and URL; issue #12.
  2. Improve default autocompleter texts; issue #15.
  3. Improve checking existence of expected argument; issue #16.
  4. Fix footer version number inconsistency; issue #17.
  5. Fix compatibility issue with Tutor LMS; issue #19.
  6. Add identifier argument to active installs filter; pull #20.
  7. Add missing text domain; issue #21.
  8. Fix incorrect translation function; issue #22.
  9. Improve handling up upgrade notices; issue #23.
  10. Update "CodePotent" to "Code Potent" in the code comments.
  11. Update online documentation.

Version 1.0.0-rc2

DEC-21-2019

  1. Move $config['server'] property to a constant; to keep editable lines in one place.
  2. Add better inline descriptions of data fields.
  3. Add better inline description to the $cp_latest_version property.
  4. Add link to admin bar for creating new endpoints.
  5. Add filter for passing in number of active installs.
  6. Update constants that contain PLUGIN_REPO; replace that string with PLUGIN_ENDPOINT.
  7. Minor text changes.
  8. Make jQuery multilingual.
  9. Translate notification texts.
  10. Change custom post type identifer to plugin_endpoint; issue #1.
  11. Convert to new post type on activation; issue #1.
  12. Remove forced menu positioning; preserve the filter; issue #2.
  13. Add "View Details" thickbox link to plugin meta row; issue #3.
  14. Improve support for UpdateClient.class.php relocation; issue #4.
  15. Update PLUGIN_DIRNAME constant to be backward compatible to PHP 5.6; issue #5.
  16. Add filter for additional processing of incoming requests; issue #6, pull #7.
  17. Add privacy disclosure functionality; issue #8.
  18. Add housekeeping code for plugin deletion; issue #9.

Version 1.0.0-rc1

NOV-15-2019

  1. Initial release.

License

The Update Manager plugin is released under the General Public License.

Installation Requirements

  1. ClassicPress 1.0.0 or later
  2. PHP 5.6 or later

Manual Installation

  1. Download the zip file to your local computer
  2. Login to your ClassicPress website.
  3. Navigate to Dashboard > Plugins > Add New > Upload Plugin
  4. Upload the plugin zip file to your site
  5. Click to Install the plugin
  6. Click to Activate the plugin
  7. See the documentation for next steps

Standard Installation

  1. Login to your ClassicPress website.
  2. Navigate to Dashboard > Plugins > Add New
  3. Search for Code Potent or Update Manager
  4. Find the Update Manager plugin in the results
  5. Click to Install the plugin
  6. Click to Activate the plugin
  7. See the documentation for next steps

Note: This method will be available when the official ClassicPress plugin directory is ready.

Checksums – Coming Soon

Checksums allow you to verify the integrity of the plugin file.

Conflicts

There are no reported conflicts between the Update Manager plugin and other ClassicPress plugins or themes. If you experience something unexpected, please send an email!

Plugin Integration

To setup a plugin to work with the Update Manager, the following general steps are recommended. This page details each of the steps and describes how to use the plugin going forward.

  1. Install and activate the Update Manager plugin on your own site.
  2. Add the Update Client file to your own plugin.
  3. Create an update endpoint in the Update Manager.
  4. Test the endpoint in a browser.
  5. Test the update on an actual site.
  6. Publish the endpoint.

Install the Update Manager Plugin

  1. Install the Update Manager plugin according to the installation instructions.
  2. Navigate to Dashboard > Update Manager > Plugins > Add New – this is where you will be managing your plugin updates.

Adding the Update Client file to a Plugin

  1. Download and copy the UpdateClient.class.php file into your plugin’s file structure.
  2. Set namespace to a unique value; line 25.
  3. Set UPDATE_SERVER to the URL where your Update Manager plugin is installed; line 28.
  4. Set UPDATE_TYPE to ‘plugin’; line 31.
  5. Use require_once('/path/to/UpdateClient.class.php') in your plugin’s primary PHP file to run the update client.

Creating an Update Endpoint for a Plugin

  1. Navigate to Dashboard > Update Manager > Plugins > Add New
  2. Set the Endpoint Identifier for your plugin; ie, my-plugin-folder/my-plugin-file.php.
  3. Add your Plugin Details to the editor; if you have a readme.txt file, you can copy it right in.
  4. Optionally, add URLs for any Testing Domains that can receive test updates.
  5. Optionally, add contact methods for receiving Notifications of issues.
  6. Click Publish to make the update immediately available.

Viewing an Update Endpoint in the Browser

If your update endpoint isn’t working as expected, neither will your update. So, before even testing the update process, it’s a good idea to call up the endpoint in a browser and verify that it looks like valid JSON data. The following steps will allow you to view endpoints in the browser. This is not available for endpoints in Draft status.

  1. Navigate to Dashboard > Update Manager > Plugins
  2. Hover over any of the listed endpoints and click View Endpoint.

Pushing an Update to all Plugin Users

When you create a new version of your plugin, you’ll need to push it out to your end users. To do this:

  1. Navigate to Dashboard > Update Manager > Plugins
  2. Click to Edit the particular endpoint.
  3. Update the Plugin Details section to reflect the new version’s details.
  4. Click to Update the endpoint.

Pushing an Update to Limited Users for Testing Purposes

  1. Navigate to Dashboard > Update Manager > Plugins
  2. Click to Edit an endpoint.
  3. Set the Status to Pending Review.
  4. Click to Update the endpoint.

With the plugin in Pending Review status, the update will be made available only to those domains specified in the Testing Domains field. Note that if you are trying to test an update on a plugin that is installed on the same server as the Update Manager plugin, you must still whitelist the domain, otherwise it will not receive the update notification.

Promoting Feedback from your Test Team

  1. Navigate to Dashboard > Update Manager > Plugins
  2. Click to Edit an endpoint.
  3. Add one or more contact methods to the Notifications field.
  4. Click to Update the endpoint.

This field accepts multiple email addresses and a single URL, separated by commas. The order is not important. If you supply email addresses, a link will be crafted that prepopulates an email with some basic information. If you supply a URL, it will be used to point the user toward a feedback form, GitHub repo, or wherever. If you supply email(s) and URL, both options will be offered. These links will appear in the test notice that appears in the modal windows.

Pushing Alpha, Beta, and Release Candidate Versions

Semantic versioning is used throughout. You can push updates for alpha, beta, and release candidate versions without any trouble. Let’s say you wanted to run through the basic steps with a version 1.0.0 plugin. You might release a plugin at 1.0.0-alpha. Next, you could bump the version to 1.0.0-beta… and then 1.0.0-rc1, and then 1.0.0-rc2, and then 1.0.0. Each version in that chain succeeds the previous. Here’s the upgrade path, a bit more visually.

1.0.0-alpha  <   1.0.0-beta  <   1.0.0-rc1  <   1.0.0-rc2  <   1.0.0

Supplemental Note: You can also push sequential updates for a given pre-release (alpha, beta, or RC version). For example, 1.0.0-alpha1 is less than 1.0.0-alpha2 which is less than 1.0.0-alpha3, which is less than…well, you get the idea.

Using Custom Images

You can use your own plugin banner and icon images to improve the end user experience. If you have these images, create an /images/ directory in your plugin and drop them there. They will be automatically discovered and you are free to mix and match any of the following filetypes. If you prefer, you can define your own custom image path; see the filters documentation. If you do not have such images, the default system image will be used for the icon, and your plugin modal windows just won’t have a header graphic. The following are supported:

Normal Images

SVG: icon.svg, banner.svg
PNG: icon-128.png, banner-772x250.png
JPG: icon-128.jpg, banner-772x250.jpg

Retina Images

SVG: icon.svg, banner.svg
PNG: icon-256.png, banner-1544x500.png
JPG: icon-256.jpg, banner-1544x500.jpg

Screenshots

PNG: screenshot-1.png, screenshot-2..png, …
JPG: screenshot-1.jpg, screenshot-2.jpg, …

Note: Screenshots are displayed from lowest to highest, however, they need not be sequentially named. The plugin will find them regardless and will apply the correct caption(s) to the correct image(s).

Filters

Processing Incoming Requests

To work with the data received from incoming requests, the following filter can be added to a utility plugin. This might be used for tracking installations or adding/removing values to/from the request before querying the endpoint for data. This filter accepts 1 argument, $request. Replace {component-type} with either plugin or `theme', depending on the type of request you are trying to filter.

function some_function_name($request) {

     // Do your processing here.

    // Return the processed request.
    return $request;
}
add_filter('codepotent_update_manager_filter_{component-type}_request', $request);

Active Installations

The Update Manager plugin does not track or know how many active installations there are of any given plugin. If you are otherwise tracking those numbers, you can filter them into the remote modal windows by adding the following filter to a utility plugin. The filter accepts 1 argument, $active_installations. Replace {identifier} with your plugin identifier, ie, my-plugin-dir/my-plugin-file.php.

function some_function_name($number, $identifier) {
    return $number;
}
add_filter('codepotent_update_manager_{identifier}_active_installs', 'some_function_name', 10, 2);

Admin Menu Position

To change the admin menu item's position, this filter can be added to a utility plugin. See also the following table of menu position values.

function some_function_name($position) {
    return 22;
}
add_filter('codepotent_update_manager_menu_pos', 'some_function_name');

Menu Item Positions
1: Top of menu
2: below Dashboard
5: below Posts
10: below Media
20: below Pages
25: below Comments
60: below first separator
65: below Plugins
70: below Users
75: below Tools
80: below Settings
100: below second separator
null: below Comments, in natural order; default

Plugin Images Path & URL

These two filters can be used if you already have a particular directory schema under which your plugin's images are stored. These filters can be placed in a utility plugin.

function my_custom_image_path($path) {
	return '/path/to/your-site/wp-content/plugins/your-plugin-name/images';
}
add_filter('codepotent_update_manager_image_path', 'my_custom_image_path');

function my_custom_image_url($url) {
	return 'https://yoursite.com/wp-content/plugins/your-plugin-name/images';
}
add_filter('codepotent_update_manager_image_url', 'my_custom_image_url');

Filter Notification Email Properties

If you are using the notification features for endpoints to allow your testers to contact you with feedback, you can filter the default subject and body of the email message with the following filters.

function some_function_name($subject) {
    return 'Some custom subject line';
}
add_filter('codepotent_update_manager_notification_email_subject', 'some_function_name');

function some_function_name($body) {
    $body = 'A line followed by two blank lines.'."\n\n";
    $body .= 'Another line...';
    return $body;
}
add_filter('codepotent_update_manager_notification_email_body', 'some_function_name');

Footer Credit

For extension authors, this filter allows for a credit link to be appended to the Code Potent footer text. This filter accepts a single argument, $text, which is an empty string, by default. Note that all HTML is stripped, except for the <a> tag. The URLs can be as long as needed, but, the visible text and links may be truncated at 50 characters. This filter is for adding a credit link, not for marketing text and upsells; misusing this feature will cause it to be removed.

function some_function_name($text) {
    return 'Featuring My Extension by Author Name';    
}
add_filter('codepotent_update_manager_extension_footer_{your-slug-here}', 'some_function_name');

Here's what users say about the Update Manager plugin for ClassicPress

“Update Manager was both easy to add to my 30+ ClassicPress plugins and to deploy to a site for hosting and managing the updates hosted on GitHub. Now anyone using my plugins can get hassle-free updates when I release new functionality.”

~ Ian Grieve, Plugin Developer

dev.azrcrv.co.uk

“The ability to test plugin updates internally before pushing them out to the full user-base? Priceless! As the developer of Update Manager, surely I'm biased, but, there really is a lot to love about this plugin!”

~ John Alarcon, Creator

codepotent.com

“I have a number of custom plugins that I use on all my sites. Previously, updating these was a laborious job that required me to manually upload the new files to every site. This has become a one-click, 10-second job. The set-up process is clear, easy and logical, and it works perfectly. 5 stars!”

~ Alan Coggins, Website Developer

simplycomputing.com.au

“There is a learning curve in understanding how it actually works and how it ties in with your plugin, but once you figure it out, it is very simple to use.”

~ Graham Beech, Hosting Provider

hostwithaussie.com

“This was well worth the wait, thank you – just took it for a test drive and although it took a little bit of a head scratch I got it to do exactly what it says on the tin. 5 stars!”

~ Zulfikar Gani, Theme Developer

classicdesigner.co.uk

“It works as a charme and with few minor tweak it is working very well with the statistic part I’m working on! Loved all the filters you added! Great work!”

~ Simone Fioravanti, Plugin Developer

www.gieffeedizioni.it

“Wow!! What an amazing plugin! This gives me motivation in building and updating my plugins! I like this plugin a lot and for me personally it is a game-changer! Thanks a lot for building amazing stuff!!”

~ Christophe Hollebeke, Web Developer

https://webkust.be

“I’m pleased to say that Update Manager works seamlessly with MainWP. MainWP shows the Update Manager-controlled plugins that need updating and it successfully updates them. Nice job!”

~ ZigPress, Plugin Developer

www.zigpress.com

Share Your Experience

Had a great experience with the Update Manager plugin for ClassicPress? Share your thoughts and get a link back to your site! Emails are not shared or published.

 

Related Plugins

Click to access the login or register cheese