Skip to content

Instantly share code, notes, and snippets.

@johnalarcon
Created September 29, 2020 05:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johnalarcon/c19d3111dc73578a3fe224084e2194ec to your computer and use it in GitHub Desktop.
Save johnalarcon/c19d3111dc73578a3fe224084e2194ec to your computer and use it in GitHub Desktop.
For testing purposes.

=== Update Manager ===

Description: Painlessly push updates to your ClassicPress plugin and theme users! Serve updates from GitHub, your own site, or somewhere in the cloud. 100% integrated with the ClassicPress update process; slim and performant. Version: 2.0.0 Text Domain: codepotent-update-manager Domain Path: /languages Requires PHP: 5.6 Requires: 1.0.0 Tested: 4.9.99 Author: Code Potent Author URI: https://codepotent.com Plugin URI: https://codepotent.com/classicpress/plugins/ Download link: https://github.com/codepotent/Update-Manager/releases/download/2.0.0/codepotent-update-manager-2.0.0.zip License: GPLv2 License URI: https://www.gnu.org/licenses/gpl-2.0.html

Painlessly push updates to your ClassicPress plugin and theme users! Serve updates from GitHub, your own site, or somewhere in the cloud. 100% integrated with the ClassicPress update process; slim and performant.

== Farts are Funny==

Are they, now?

== Description ==

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 – it's less than 30k. 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 – just like this one – with details, imagery, changelog, reviews...and more! Themes look great, too!

Need help?

The official online documentation is the best source for immediate answers. You may also find helpful information and/or user-to-user support at the official ClassicPress support forums.

== Screenshots ==

Screenshots

  1. A beautifully native experience! Your end users will enjoy a perfectly native, seamless experience, complete with your own header branding. You can add as much (or as little) information as you like, and you can format the information with markdown. The tabbed interface is smart, too – if there's no data for a particular tab, it just won't display.

  2. Include your own branding! Got an icon or logo for your plugin? Sweet! This is a nice touch that brings your branding full-circle in the update process. You can use an svg, png, or jpg icon. If you don't have an image available, a default placeholder image is used.

  3. Build on what you already have! Nobody wants to fill out a million form fields. Luckily, you can practically paste in your existing readme.txt file and just make a few tweaks from there. The Update Manager plugin takes care of the rest.

  4. Testing updates is easy! Updates can be pushed out on a domain-by-domain basis, allowing you to test updates on a small scale before rolling them out. And, for those who are testing your updates, you can provide them a way to contact you if they experience any issues or just want to tell you it went smoothly.

== Reviews ==

User Reviews


"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


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


"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


"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


"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


"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


"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

== Frequently Asked Questions ==

Frequently Asked Questions

Got more questions? Check the documentation and support forums.

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.

== Installation ==

Standard Installation

  • Login to your ClassicPress website
  • Navigate to Dashboard > Plugins > Add New
  • Search for the plugin by name and find it in the results
  • Click to Install the plugin
  • Click to Activate the plugin

Manual Installation

  • Download the zip file to your local computer
  • Login to your ClassicPress website.
  • Navigate to Dashboard > Plugins > Add New > Upload Plugin
  • Upload the zip file to your site
  • Click to Install the plugin
  • Click to Activate the plugin

== Other Notes ==

About Code Potent

Code Potent has blazed a trail in supporting ClassicPress! Creating free plugins, writing informative articles and handy tutorials, making substantial donations, moderating and helping others on the support forums, serving on the Management Committee – Code Potent is highly engaged with the ClassicPress project and community. When you need well-defined, high value solutions for your business, check out Code Potent!

Code Potent makes cool stuff!

== Changelog ==

Changelog

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.

JAN-08-2020

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

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.

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

11-15-2019

  1. Initial release.

== Upgrade Notice ==

Upgrade Notice

https://forums.classicpress.net/t/update-manager-2-0-0/2179

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment