Disable updraft plus ads and multisite warning

I hate advertisements. Whatever the reason, like using a free plugin, or visiting a website, I think forcing advertisements is a bad idea. Hence, having an advertisement at the top of every page on my dashboard, and others on a plugin settings page particularly made me irritated.

The plugin which is the subject for this is “Updraft Plus” backup plugin for wordpress blogs.

On top of displaying a banner stating that the plugin is incompatible with WordPress multisite installations, it also places advertisements in the plugin settings page.

It turns out that these ads depend on the presence of the definition of a single constant in the php file.

So to remove them, edit your wp-content/plugins/updraftplus/updraftplus.php

Add the following constant:

const UPDRAFTPLUS_PREMIUM='yes';

after the beginning php tag, so it looks like:

<!--?php
/*
Plugin Name: <span class="hiddenSpellError" pre=""-->UpdraftPlus - Backup/Restore
Plugin URI: http://wordpress.org/extend/plugins/updraftplus
Description: Backup and restore: your content and database can be automatically backed up to Amazon S3, Dropbox, Google Drive, FTP or email, on separate schedules.
Author: David Anderson
Version: 1.4.11
Donate link: http://david.dw-perspective.org.uk/donate
License: GPLv3 or later
Author URI: http://wordshell.net
*/
const UPDRAFTPLUS_PREMIUM='yes';
/*
TODO

Wham! All the ads and the big ugly banner is gone!

As of the latest version, the above no longer works. I will leave you to figure out for yourself how to fix the ads and the warning.

Disclaimer: I encourage you to buy Updraft plus to encourage the author’s efforts. The code is well within the realm of GPLv3 and you’re free to make any modifications you want, and distribute it, however.

Update: The following patch has been updated to work with Updraftplus 1.4.14:

--- /root/updraftplus/options.php       2013-02-20 21:23:54.340665318 +0530
+++ ../updraftplus/options.php  2013-02-20 21:33:01.900748290 +0530
@@ -77,7 +77,7 @@ class UpdraftPlus_Options {
        }

        public static function show_admin_warning_multisite() {
-
+       return ;
                global $updraftplus;

                $updraftplus-&gt;show_admin_warning('&lt;strong&gt;UpdraftPlus warning:&lt;/strong&gt; This is a WordPress multi-site (a.k.a. network) installation. &lt;a href="http://updraftplus.com"&gt;WordPress Multisite is supported by UpdraftPlus Premium&lt;/a&gt;. Non-premium UpdraftPlus does not support multi-site installations securely. &lt;strong&gt;Every&lt;/strong&gt; blog admin can both back up (and hence access the data, including passwords, from) and restore (including with customised modifications, e.g. changed passwords) &lt;strong&gt;the entire network&lt;/strong&gt;. Unless you are the only blog admin user across the entire network, you should immediately de-activate UpdraftPlus. (This applies to all WordPress backup plugins unless they have been explicitly coded for multisite compatibility).', "error");
--- /root/updraftplus/updraftplus.php   2013-02-20 21:23:54.339662943 +0530
+++ ../updraftplus/updraftplus.php      2013-02-20 21:31:28.415766309 +0530
@@ -9,7 +9,7 @@ Donate link: http://david.dw-perspective
 License: GPLv3 or later
 Author URI: http://wordshell.net
 */
-
+const UPDRAFTPLUS_PREMIUM='yes';
 /*
 TODO
 //Put in old-WP-version warning, and point them to where they can get help

 


You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.