Easy Updates Manager - Version 3.4.0

Version Description

  • Added "Disable Plugins Individually" Setting and Section
  • Added Help Postbox to Settings
  • Updated Screenshots
  • Added Tooltips to some Settings
  • Added Better License
  • Updated Description
Download this release

Release Info

Developer kidsguide
Plugin Icon 128x128 Easy Updates Manager
Version 3.4.0
Comparing to
See all releases

Code changes from version 3.3.0 to 3.4.0

Files changed (2) hide show
  1. Function.php +203 -20
  2. readme.txt +17 -35
Function.php CHANGED
@@ -2,15 +2,16 @@
2
  /**
3
  * @package Disable Updates Manager
4
  * @author Websiteguy
5
- * @version 3.3.0
6
  */
7
  /*
8
  Plugin Name: Disable Updates Manager
9
  Plugin URI: http://wordpress.org/plugins/stops-core-theme-and-plugin-updates/
10
- Version: 3.3.0
11
- Description: Pick which type of updates you would like to disable. Just use are settings forum.
12
  Author: Websiteguy
13
  Author URI: http://profiles.wordpress.org/kidsguide/
 
14
  Tested up to WordPress 3.8.1
15
  */
16
  /*
@@ -32,7 +33,7 @@ along with this program; if not, write to the Free Software
32
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
33
  */
34
 
35
- define("DISABLEUPDATESMANAGERVERSION", "3.3.0");
36
 
37
  class Disable_Updates {
38
  // Set status in array
@@ -267,6 +268,135 @@ add_filter( 'update_footer', 'change_footer_version', 9999);
267
 
268
  case 'abup' :
269
  wp_clear_scheduled_hook( 'wp_maybe_auto_update' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
270
  break;
271
  }
272
  }
@@ -295,23 +425,42 @@ break;
295
  <div class="postbox" style="width: 590px; border-radius: 4px;">
296
  <H3>&nbsp;Disable Updates</H3>
297
  <div class="inside">
 
298
  <label for="all_notify">
299
- <input type="checkbox" <?php checked(1, (int)$this->status['all'], true); ?> value="1" id="all_notify" name="_disable_updates[all]"> <?php _e('Disable All Updates <small>(Not including the settings under "Other Settings")</small>', 'disable-updates-manager') ?>
300
  </label>
301
- <br>
 
 
 
 
 
302
  <span style="padding-left: 20px; display:block">
303
  <label for="plugins_notify">
304
  <input type="checkbox" <?php checked(1, (int)$this->status['plugin'], true); ?> value="1" id="plugins_notify" name="_disable_updates[plugin]"> <?php _e('Disable Plugin Updates', 'disable-updates-manager') ?>
305
  </label>
306
- <br>
307
  <label for="themes_notify">
308
  <input type="checkbox" <?php checked(1, (int)$this->status['theme'], true); ?> value="1" id="themes_notify" name="_disable_updates[theme]"> <?php _e('Disable Theme Updates', 'disable-updates-manager') ?>
309
  </label>
310
- <br>
311
  <label for="core_notify">
312
  <input type="checkbox" <?php checked(1, (int)$this->status['core'], true); ?> value="1" id="core_notify" name="_disable_updates[core]"> <?php _e('Disable WordPress Core Update', 'disable-updates-manager') ?>
313
  </label>
314
- </span>
 
 
 
 
 
 
 
 
 
 
 
 
 
315
  </div>
316
  </div>
317
  </fieldset>
@@ -329,36 +478,70 @@ break;
329
  <input type="checkbox" <?php checked(1, (int)$this->status['abup'], true); ?> value="1" id="abup_notify" name="_disable_updates[abup]"> <?php _e('Disable Automatic Background Updates', 'disable-updates-manager') ?>
330
  </label>
331
  <br>
 
332
  <label for="wpv_notify">
333
- <input type="checkbox" <?php checked(1, (int)$this->status['wpv'], true); ?> value="1" id="wpv_notify" name="_disable_updates[wpv]"> <?php _e('Remove WordPress Core Version <small>(For All Users)</small>', 'disable-updates-manager') ?>
334
  </label>
335
- <br>
 
 
 
 
 
336
  <label for="page_notify">
337
- <input type="checkbox" <?php checked(1, (int)$this->status['page'], true); ?> value="1" id="page_notify" name="_disable_updates[page]"> <?php _e('Remove Updates Page <small>(Under Dashboard)</small>', 'disable-updates-manager') ?>
338
  </label>
 
 
 
 
 
 
339
  </span>
340
  </div>
341
  </div>
342
  <p class="submit">
343
  <input type="submit" class="button-primary" value="<?php _e('Update Settings') ?>" />
344
  </p>
345
- <u><h3>Help</h3></u>
346
- <div style="width:160px;height:30px;border:1px solid #929292; border-radius: 4px; padding-left: 7px; padding-right: 7px;"><center>
347
- <p><a href="http://wordpress.org/support/plugin/stops-core-theme-and-plugin-updates">Support</a> | <a href="http://www.youtube.com/watch?v=jAqd0SjLQ_M">Tutorial</a> | <a href="http://wordpress.org/plugins/stops-core-theme-and-plugin-updates/faq/">FAQ</a></p></center>
 
 
 
348
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
349
  </fieldset>
350
  </td>
351
- </tr>
352
 
353
  <tr>
354
- <br>
355
  <span style="border-style:solid; border-width:2px; border-color:#dd0606; width: 604px; padding-left: 2px; padding-right: 2px; border-radius: 7px; display:block" >
356
  <p align="center">
357
  <strong>Please Note! - </strong>If either your WordPress core, theme, or plugins get too out of date, you may run into compatibility problems.
358
- </p>
359
  </span>
360
- </div>
361
- </div>
362
  </tr>
363
 
364
  </table>
2
  /**
3
  * @package Disable Updates Manager
4
  * @author Websiteguy
5
+ * @version 3.4.0
6
  */
7
  /*
8
  Plugin Name: Disable Updates Manager
9
  Plugin URI: http://wordpress.org/plugins/stops-core-theme-and-plugin-updates/
10
+ Version: 3.4.0
11
+ Description: Pick which type of updates you would like to disable. Just use the settings.
12
  Author: Websiteguy
13
  Author URI: http://profiles.wordpress.org/kidsguide/
14
+ License: GPL2
15
  Tested up to WordPress 3.8.1
16
  */
17
  /*
33
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
34
  */
35
 
36
+ define("DISABLEUPDATESMANAGERVERSION", "3.4.0");
37
 
38
  class Disable_Updates {
39
  // Set status in array
268
 
269
  case 'abup' :
270
  wp_clear_scheduled_hook( 'wp_maybe_auto_update' );
271
+ break;
272
+
273
+ case 'pd' :
274
+
275
+ if(defined('disable_updates_loaded')) {
276
+ return;
277
+ }
278
+ define('disable_updates_loaded', 1);
279
+
280
+ add_action('init','disable_updates_get');
281
+ add_action('init','disable_updates_addFilters');
282
+
283
+ add_filter("plugin_row_meta", 'disable_updates_pluginLinks', 10, 2);
284
+ add_filter('site_transient_update_plugins', 'disable_updates_blockUpdateNotifications');
285
+ //add_filter('site_transient_update_themes', 'disable_updates_blockUpdateNotifications');
286
+
287
+
288
+ function disable_updates_addFilters() {
289
+ if(!current_user_can('update_plugins')) {
290
+ return;
291
+ }
292
+
293
+ $plugins = get_site_transient('update_plugins');
294
+ $to_block = get_option('disable_updates_blocked');
295
+
296
+ if(isset($plugins->response)) {
297
+ // loop through all of the plugins with updates available and attach the appropriate filter
298
+ foreach($plugins->response as $filename => $plugin) {
299
+ // check that the version is the version we want to block updates to
300
+ $s = 'after_plugin_row_' . $filename;
301
+ //in_plugin_update_message-
302
+ add_action($s, 'disable_updates_blockLink', -1, 1);
303
+ }
304
+ }
305
+ if(isset($plugins->disable_updates)) {
306
+ foreach($plugins->disable_updates as $filename => $plugin) {
307
+ // check that the version is the version we want to block updates to
308
+ $s = 'after_plugin_row_' . $filename;
309
+ add_action($s, 'disable_updates_unblockLink', 2, 1);
310
+ }
311
+ }
312
+ }
313
+
314
+ function disable_updates_get() {
315
+
316
+ if(!current_user_can('update_plugins')) {
317
+ return;
318
+ }
319
+
320
+ // see if there are actions to process
321
+ if(!isset($_GET['disable_updates']) || !isset($_GET['_wpnonce'])) {
322
+ return;
323
+ }
324
+
325
+ if(!wp_verify_nonce($_GET['_wpnonce'], 'disable_updates')) {
326
+ return;
327
+ }
328
+
329
+ $blocked = get_option('disable_updates_blocked');
330
+ $plugins = get_site_transient('update_plugins');
331
+
332
+ // block action
333
+ if(isset($_GET['block']) && isset($plugins->response) && isset($plugins->response[$_GET['block']])) {
334
+ $p = $plugins->response[$_GET['block']];
335
+ $blocked[$_GET['block']] = array('slug' => $p->slug, 'new_version' => $p->new_version);
336
+ }
337
+
338
+ if(isset($_GET['unblock'])) {
339
+ unset($blocked[$_GET['unblock']]);
340
+
341
+ }
342
+
343
+ update_option('disable_updates_blocked', $blocked);
344
+
345
+ }
346
+
347
+ function disable_updates_blockUpdateNotifications($plugins) {
348
+
349
+ if(!isset($plugins->response) || count($plugins->response) == 0) {
350
+ return $plugins;
351
+ }
352
+
353
+ $to_block = (array)get_option('disable_updates_blocked');
354
+
355
+ foreach($to_block as $filename => $plugin) {
356
+
357
+ if(isset($plugins->response[$filename])
358
+ && $plugins->response[$filename]->new_version == $plugin['new_version']) {
359
+
360
+ $plugins->disable_updates[$filename] = $plugins->response[$filename];
361
+ unset($plugins->response[$filename]);
362
+ }
363
+ }
364
+ return $plugins;
365
+ }
366
+
367
+ function disable_updates_unblockLink($filename) {
368
+ disable_updates_linkStart();
369
+ echo 'Updates for this plugin are blocked. <a href="plugins.php?_wpnonce=' . wp_create_nonce('disable_updates') . '&disable_updates&unblock=' . $filename . '">Unblock</a>.</div></td></tr>';
370
+ }
371
+
372
+ function disable_updates_blockLink($filename) {
373
+ disable_updates_linkStart();
374
+ echo ' <a href="plugins.php?_wpnonce=' . wp_create_nonce('disable_updates') . '&disable_updates&block=' . $filename . '">Block updates for this plugin</a>.</div></td></tr>';
375
+ }
376
+
377
+ function disable_updates_linkStart() {
378
+
379
+ // wp_plugin_update_row
380
+ // wp-admin/includes/update.php
381
+
382
+ $wp_list_table = _get_list_table('WP_Plugins_List_Table');
383
+ echo '<tr class="plugin-update-tr"><td colspan="' . $wp_list_table->get_column_count() . '" class="plugin-update colspanchange"><div class="update-message">';
384
+ }
385
+
386
+ function disable_updates_pluginLinks( $links, $file ) {
387
+ $plugin = plugin_basename(__FILE__);
388
+ if($file == $plugin) {
389
+ $links[] = '<a target="_BLANK" href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=LC5UR6667DLXU"></a>';
390
+ }
391
+ return $links;
392
+ }
393
+
394
+ if(!function_exists('printr')) {
395
+ function printr($txt) {
396
+ echo '<pre>'; print_r($txt); echo '</pre>';
397
+ }
398
+ }
399
+
400
  break;
401
  }
402
  }
425
  <div class="postbox" style="width: 590px; border-radius: 4px;">
426
  <H3>&nbsp;Disable Updates</H3>
427
  <div class="inside">
428
+ <div class="showonhover">
429
  <label for="all_notify">
430
+ <input type="checkbox" <?php checked(1, (int)$this->status['all'], true); ?> value="1" id="all_notify" name="_disable_updates[all]"> <?php _e('Disable All Updates', 'disable-updates-manager') ?>
431
  </label>
432
+ <span>
433
+ <a href="#" class="viewdescription">?</a>
434
+ <span class="hovertext">Only includes settings under "Disable Updates", not "Disable Updates Individually".</span>
435
+ </span>
436
+ </div>
437
+ </span>
438
  <span style="padding-left: 20px; display:block">
439
  <label for="plugins_notify">
440
  <input type="checkbox" <?php checked(1, (int)$this->status['plugin'], true); ?> value="1" id="plugins_notify" name="_disable_updates[plugin]"> <?php _e('Disable Plugin Updates', 'disable-updates-manager') ?>
441
  </label>
442
+ <br>
443
  <label for="themes_notify">
444
  <input type="checkbox" <?php checked(1, (int)$this->status['theme'], true); ?> value="1" id="themes_notify" name="_disable_updates[theme]"> <?php _e('Disable Theme Updates', 'disable-updates-manager') ?>
445
  </label>
446
+ <br>
447
  <label for="core_notify">
448
  <input type="checkbox" <?php checked(1, (int)$this->status['core'], true); ?> value="1" id="core_notify" name="_disable_updates[core]"> <?php _e('Disable WordPress Core Update', 'disable-updates-manager') ?>
449
  </label>
450
+ <fieldset>
451
+ </span>
452
+ <H4>Disable Updates Individually</H4>
453
+ <div class="showonhover">
454
+ <label for="pd_notify">
455
+ <input type="checkbox" <?php checked(1, (int)$this->status['pd'], true); ?> value="1" id="pd_notify" name="_disable_updates[pd]"> <?php _e('Disable Plugins Individually', 'disable-updates-manager') ?>
456
+ </label>
457
+ <span>
458
+ <a href="#" class="viewdescription">?</a>
459
+ <span class="hovertext">When their is an update for a plugin, go to the plugins list (plugins.php) and look at the plugins update notice(s).
460
+
461
+ </span>
462
+ </span>
463
+ </div>
464
  </div>
465
  </div>
466
  </fieldset>
478
  <input type="checkbox" <?php checked(1, (int)$this->status['abup'], true); ?> value="1" id="abup_notify" name="_disable_updates[abup]"> <?php _e('Disable Automatic Background Updates', 'disable-updates-manager') ?>
479
  </label>
480
  <br>
481
+ <div class="showonhover">
482
  <label for="wpv_notify">
483
+ <input type="checkbox" <?php checked(1, (int)$this->status['wpv'], true); ?> value="1" id="wpv_notify" name="_disable_updates[wpv]"> <?php _e('Remove WordPress Core Version', 'disable-updates-manager') ?>
484
  </label>
485
+ <span>
486
+ <a href="#" class="viewdescription">?</a>
487
+ <span class="hovertext">Removes it for all users.</span>
488
+ </span>
489
+ </div>
490
+ <div class="showonhover">
491
  <label for="page_notify">
492
+ <input type="checkbox" <?php checked(1, (int)$this->status['page'], true); ?> value="1" id="page_notify" name="_disable_updates[page]"> <?php _e('Remove Updates Page', 'disable-updates-manager') ?>
493
  </label>
494
+ <span>
495
+ <a href="#" class="viewdescription">?</a>
496
+ <span class="hovertext">The one under the dashboard.</span>
497
+ </span>
498
+ </div>
499
+
500
  </span>
501
  </div>
502
  </div>
503
  <p class="submit">
504
  <input type="submit" class="button-primary" value="<?php _e('Update Settings') ?>" />
505
  </p>
506
+ <div class="postbox" style="width: 160px; height: 35px; border-radius: 4px;">
507
+ <div class="inside">
508
+ <p align="center">
509
+ <a href="http://wordpress.org/support/plugin/stops-core-theme-and-plugin-updates">Support</a> | <a href="http://www.youtube.com/watch?v=jAqd0SjLQ_M">Tutorial</a> | <a href="http://wordpress.org/plugins/stops-core-theme-and-plugin-updates/faq/">FAQ</a>
510
+ </p>
511
+ </span>
512
  </div>
513
+ </div>
514
+ <style type="text/css">
515
+ .showonhover {position: relative;}
516
+ .showonhover .hovertext {
517
+ opacity: 0;
518
+ top: -99999px;
519
+ position:absolute;
520
+ z-index:1000;
521
+ border:1px solid #ffd971;
522
+ background-color:#fffdce;
523
+ padding:11px;
524
+ width:140px;
525
+ font-size: 0.95em;
526
+ -webkit-transition: opacity 0.3s ease;
527
+ -moz-transition: opacity 0.3s ease;
528
+ -o-transition: opacity 0.3s ease;
529
+ transition: opacity 0.3s ease;
530
+ }
531
+ .showonhover:hover .hovertext {opacity:1;top:0;}
532
+ a.viewdescription {color:#999;}
533
+ a.viewdescription:hover {background-color:#999; color: White;}
534
+ </style>
535
  </fieldset>
536
  </td>
537
+ </tr>
538
 
539
  <tr>
 
540
  <span style="border-style:solid; border-width:2px; border-color:#dd0606; width: 604px; padding-left: 2px; padding-right: 2px; border-radius: 7px; display:block" >
541
  <p align="center">
542
  <strong>Please Note! - </strong>If either your WordPress core, theme, or plugins get too out of date, you may run into compatibility problems.
543
+ </p>
544
  </span>
 
 
545
  </tr>
546
 
547
  </table>
readme.txt CHANGED
@@ -5,7 +5,7 @@ Requires at least: 3.0
5
  Tested up to: 3.8.1
6
  Stable tag: trunk
7
 
8
- A configurable plugin that disables updates. Easy to customize with 5+ settings.
9
 
10
  == Description ==
11
  This plugin is 100% configurable! Check the updates you would like to disable in the settings page.
@@ -14,9 +14,10 @@ Their are also other settings to customize.
14
 
15
  = Features =
16
  <ol>
 
17
  <li>Has a simple settings page to disable any type of update.</li>
18
- <li>Has extra settings like remove the "updates" page, remove WordPress core version, or disable background updates. </li>
19
- <li>Disable All Updates setting disables update e-mails, debug e-mails, and more. </li>
20
  <li>Has a link to Support, FAQ, Settings, and the Tutorial.</li>
21
  </ol>
22
 
@@ -24,10 +25,10 @@ To see more features view the <a href="http://wordpress.org/plugins/stops-core-t
24
 
25
  = Video Tutorial =
26
  [youtube http://www.youtube.com/watch?v=jAqd0SjLQ_M]
 
27
 
28
  = Just Won't to Disable One or Two? =
29
- With the new settings form under dashboard, it easy.
30
- Just check the things you won't disabled.
31
 
32
  == Frequently Asked Questions ==
33
  = Q: How is this plugin different from the other disable updates plugins? =
@@ -43,37 +44,9 @@ A: Their are a couple of differences.
43
  A: Yes, this plugin just disables the update (not removes).
44
 
45
 
46
- = Q: Is it possible to disable one plugin? Are you considering it? =
47
- A: This plugin does not disable individual plugins or theme. I am considering it but it is hard to do, and I am having trouble with it.
48
 
49
- If you would like to disable just one plugin for now, follow the steps below.
50
-
51
- = 1. = Copy the following code into your themes function.php (or child theme).
52
-
53
- `function stop_plugin_update( $value ) {
54
- unset( $value->response['smooth-slider/smooth-slider.php'] );
55
- return $value;
56
- }
57
- add_filter( 'site_transient_update_plugins', 'stop_plugin_update' );`
58
-
59
- = 2. = Get the name of your plugin, and the name of the main plugins file, and put them in the code.
60
-
61
- `function stop_plugin_update( $value ) {
62
- unset( $value->response['(Name:) smooth-slider/(Main File Name:) smooth-slider.php'] );
63
- return $value;
64
- }
65
- add_filter( 'site_transient_update_plugins', 'stop_plugin_update' );`
66
-
67
- = Note =
68
- If the plugin that you would like to disable the updates for has changed names, then you must look in the URL to find the proper name.
69
-
70
- EX) http://wordpress.org/plugins/stops-core-theme-and-plugin-updates/
71
-
72
- You take the last part.
73
-
74
- stops-core-theme-and-plugin-updates
75
-
76
- = 3. = Refresh the function.php (or functions.php) and it should disable it.
77
 
78
  == Screenshots ==
79
  1. Before View Core (Dashboard)
@@ -82,6 +55,7 @@ stops-core-theme-and-plugin-updates
82
  2. Before View (Dashboard)
83
  3. After View (Dashboard)
84
  6. Settings Page (Disable Updates Manager)
 
85
 
86
  == Installation ==
87
  Their are two way to install "Disable Updates Manager".
@@ -105,6 +79,14 @@ Their are two way to install "Disable Updates Manager".
105
 
106
  == Changelog ==
107
  = Versions Available for Downloading =
 
 
 
 
 
 
 
 
108
  = 3.3.0 =
109
  * Fixed Error with Remove WordPress Version from Footer in Admin
110
  * Added Help Spot in Settings
5
  Tested up to: 3.8.1
6
  Stable tag: trunk
7
 
8
+ A configurable plugin that disables updates. Easy to customize with 7+ settings.
9
 
10
  == Description ==
11
  This plugin is 100% configurable! Check the updates you would like to disable in the settings page.
14
 
15
  = Features =
16
  <ol>
17
+ <li>Disable a plugin individually.</li>
18
  <li>Has a simple settings page to disable any type of update.</li>
19
+ <li>Has extra settings like remove the "updates" page, remove WordPress core version, or disable background updates.</li>
20
+ <li>Disable all update setting disables update e-mails, debug e-mails, and more.</li>
21
  <li>Has a link to Support, FAQ, Settings, and the Tutorial.</li>
22
  </ol>
23
 
25
 
26
  = Video Tutorial =
27
  [youtube http://www.youtube.com/watch?v=jAqd0SjLQ_M]
28
+ <small>Version 3.1.0 tutorial video. new one coming soon.</small>
29
 
30
  = Just Won't to Disable One or Two? =
31
+ With the settings form under dashboard, it easy. Just check the things you won't disabled. Also if you would like to disable just one plugin, use the Disable Plugins Individually setting.
 
32
 
33
  == Frequently Asked Questions ==
34
  = Q: How is this plugin different from the other disable updates plugins? =
44
  A: Yes, this plugin just disables the update (not removes).
45
 
46
 
47
+ = Q: Is it possible to disable one plugin or theme? Are you considering it? =
48
+ A: This plugin does not disable themes individual but it can disable plugins individually. We are considering a setting to disable themes individually.
49
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
 
51
  == Screenshots ==
52
  1. Before View Core (Dashboard)
55
  2. Before View (Dashboard)
56
  3. After View (Dashboard)
57
  6. Settings Page (Disable Updates Manager)
58
+ 7. Disable Plugins Individually Setting (Plugin Page)
59
 
60
  == Installation ==
61
  Their are two way to install "Disable Updates Manager".
79
 
80
  == Changelog ==
81
  = Versions Available for Downloading =
82
+ = 3.4.0 =
83
+ * Added "Disable Plugins Individually" Setting and Section
84
+ * Added Help Postbox to Settings
85
+ * Updated Screenshots
86
+ * Added Tooltips to some Settings
87
+ * Added Better License
88
+ * Updated Description
89
+
90
  = 3.3.0 =
91
  * Fixed Error with Remove WordPress Version from Footer in Admin
92
  * Added Help Spot in Settings