Easy Updates Manager - Version 4.6.0

Version Description

  • Removed unknown character to fix debug error.
  • Updated screenshots.
  • Works with WordPress 4.0.1 and 4.1beta1.
  • Fixed error that didn't remove rate notice in help tab.
  • Updated some help tab content.
Download this release

Release Info

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

Code changes from version 4.3.13 to 4.6.0

assets/style - Copy.css ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Settings Page - Setting Tooltips */
2
+ .showonhover {
3
+ position: relative;
4
+ }
5
+
6
+ .showonhover .hovertext {
7
+ opacity: 0;
8
+ top: -99999px;
9
+ position: absolute;
10
+ z-index: 1000;
11
+ border: 1px solid #ffd971;
12
+ background-color: #fffdce;
13
+ padding: 2px 8px 2px 8px;
14
+ width: auto;
15
+ height: auto;
16
+ font-size: .85em;
17
+ -webkit-transition: opacity .3s ease;
18
+ -moz-transition: opacity .3s ease;
19
+ -o-transition: opacity .3s ease;
20
+ transition: opacity .3s ease;
21
+ }
22
+
23
+ .showonhover:hover .hovertext {
24
+ opacity: 1;
25
+ top: 0;
26
+ }
27
+
28
+ a.viewdescription {
29
+ color: #999;
30
+ }
31
+
32
+ a.viewdescription:hover {
33
+ background-color: #999;
34
+ color: #FFF;
35
+ }
36
+
37
+ /* Settings Page - Tutorial Columns */
38
+ #column1 {
39
+ width: 40%;
40
+ padding: 0 5pt 0 0;
41
+ float: left;
42
+ }
43
+
44
+ #column2 {
45
+ width: 40%;
46
+ padding: 0 5pt 0 0;
47
+ float: right;
48
+ }
49
+
50
+ /* Settings Page - Chosen Settings */
51
+ select.dum-enhanced-select {
52
+ width: 100%;
53
+ }
54
+
55
+ .chosen-container-multi .chosen-choices li.search-field input[type="text"] {
56
+ -webkit-box-sizing: content-box;
57
+ -moz-box-sizing: content-box;
58
+ box-sizing: content-box;
59
+ }
assets/style.css CHANGED
@@ -1,4 +1,4 @@
1
- /* Settings Page - Tooltips CSS */
2
  .showonhover {
3
  position: relative;
4
  }
@@ -34,20 +34,20 @@ a.viewdescription:hover {
34
  color: #FFF;
35
  }
36
 
37
- /* Settings Page - Columns */
38
- #column1 {
39
  width: 40%;
40
  padding: 0 5pt 0 0;
41
  float: left;
42
  }
43
 
44
- #column2 {
45
  width: 40%;
46
  padding: 0 5pt 0 0;
47
  float: right;
48
  }
49
 
50
- /* Settings Page - Chosen CSS */
51
  select.dum-enhanced-select {
52
  width: 100%;
53
  }
1
+ /* Settings Page - Setting Tooltips */
2
  .showonhover {
3
  position: relative;
4
  }
34
  color: #FFF;
35
  }
36
 
37
+ /* Settings Page - Tutorial Columns */
38
+ #acolumn1 {
39
  width: 40%;
40
  padding: 0 5pt 0 0;
41
  float: left;
42
  }
43
 
44
+ #acolumn2 {
45
  width: 40%;
46
  padding: 0 5pt 0 0;
47
  float: right;
48
  }
49
 
50
+ /* Settings Page - Chosen Settings */
51
  select.dum-enhanced-select {
52
  width: 100%;
53
  }
assets/style.min - Copy.css ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ .showonhover{position:relative}.showonhover .hovertext{opacity:0;top:-99999px;position:absolute;z-index:1000;border:1px solid #ffd971;background-color:#fffdce;padding:2px 8px 2px 8px;width:auto;height:auto;font-size:.85em;-webkit-transition:opacity .3s ease;-moz-transition:opacity .3s ease;-o-transition:opacity .3s ease;transition:opacity .3s ease}
2
+ .showonhover:hover .hovertext{opacity:1;top:0}a.viewdescription{color:#999}a.viewdescription:hover{background-color:#999;color:#FFF}select.dum-enhanced-select{width:100%}
3
+ .chosen-container-multi .chosen-choices li.search-field input[type="text"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}
4
+ #column1 {width:40%;padding:0 5pt 0 0;float:left;}#column2 {width:40%;padding:0 5pt 0 0;float:right;}
assets/style.min.css CHANGED
@@ -1,4 +1,4 @@
1
  .showonhover{position:relative}.showonhover .hovertext{opacity:0;top:-99999px;position:absolute;z-index:1000;border:1px solid #ffd971;background-color:#fffdce;padding:2px 8px 2px 8px;width:auto;height:auto;font-size:.85em;-webkit-transition:opacity .3s ease;-moz-transition:opacity .3s ease;-o-transition:opacity .3s ease;transition:opacity .3s ease}
2
  .showonhover:hover .hovertext{opacity:1;top:0}a.viewdescription{color:#999}a.viewdescription:hover{background-color:#999;color:#FFF}select.dum-enhanced-select{width:100%}
3
  .chosen-container-multi .chosen-choices li.search-field input[type="text"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}
4
- #column1 {width:40%;padding:0 5pt 0 0;float:left;}#column2 {width:40%;padding:0 5pt 0 0;float:right;}
1
  .showonhover{position:relative}.showonhover .hovertext{opacity:0;top:-99999px;position:absolute;z-index:1000;border:1px solid #ffd971;background-color:#fffdce;padding:2px 8px 2px 8px;width:auto;height:auto;font-size:.85em;-webkit-transition:opacity .3s ease;-moz-transition:opacity .3s ease;-o-transition:opacity .3s ease;transition:opacity .3s ease}
2
  .showonhover:hover .hovertext{opacity:1;top:0}a.viewdescription{color:#999}a.viewdescription:hover{background-color:#999;color:#FFF}select.dum-enhanced-select{width:100%}
3
  .chosen-container-multi .chosen-choices li.search-field input[type="text"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}
4
+ #acolumn1{width:40%;padding:0 5pt 0 0;float:left;}#acolumn2{width:40%;padding:0 5pt 0 0;float:right;}
Function.php → main.php RENAMED
@@ -1,1005 +1,1068 @@
1
- <?php
2
- /**
3
- * @package Disable Updates Manager
4
- * @author MPS Plugins
5
- * @email mpsplugins@gmail.com
6
- * @version 4.3.13
7
- */
8
- /*
9
- Plugin Name: Disable Updates Manager
10
- Plugin URI: http://www.mpswp.wordpress.com
11
- Version: 4.3.13
12
- Description: A configurable plugin that disables updates for you. Easy, clean and helpful.
13
- Author: MPS Plugins
14
- Author URI: http://www.mpswp.wordpress.com
15
- Author Email: mpsplugins@gmail.com
16
- License: GPL2
17
- Text Domain: disable-updates-manager
18
- Domain Path: languages
19
-
20
- @Copyright 2013 - 2014 MPS Plugins (email: mpsplugins@gmail.com)
21
-
22
- This program is free software; you can redistribute it and/or modify
23
- it under the terms of the GNU General Public License, version 2, as
24
- published by the Free Software Foundation.
25
-
26
- This program is distributed in the hope that it will be useful,
27
- but WITHOUT ANY WARRANTY; without even the implied warranty of
28
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29
- GNU General Public License for more details.
30
-
31
- You should have received a copy of the GNU General Public License
32
- along with this program; if not, write to the Free Software
33
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
34
-
35
- Go to the license.txt in the trunk for more information.
36
- */
37
-
38
- class Disable_Updates {
39
-
40
- // Define version.
41
- const VERSION = '4.3.13';
42
-
43
- private static $page_hook = '';
44
-
45
- function __construct() {
46
-
47
- // Load our textdomain
48
- add_action( 'init', array( __CLASS__ , 'load_textdomain' ) );
49
-
50
- // Add menu page.
51
- add_action( 'admin_menu', array( __CLASS__, 'add_submenu' ) );
52
-
53
- // Settings API.
54
- add_action( 'admin_init', array( __CLASS__, 'register_setting' ) );
55
-
56
- // Add action links.
57
- add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), array( __CLASS__, 'action_links' ) );
58
-
59
- // Add meta links.
60
- add_filter( 'plugin_row_meta', array( __CLASS__, 'meta_links' ), 10, 2 );
61
-
62
- // load the values recorded.
63
- $this->load_disable_updates();
64
- }
65
-
66
- static function load_textdomain() {
67
-
68
- load_plugin_textdomain( 'disable-updates-manager', FALSE, basename( dirname( __FILE__ ) ) . '/lang' );
69
-
70
- }
71
-
72
- static function page_actions() {
73
-
74
- do_action( 'add_meta_boxes_' . self::$page_hook, NULL );
75
- do_action( 'add_meta_boxes', self::$page_hook, NULL );
76
-
77
- // User can choose between 1 or 2 columns (default 2)
78
- add_screen_option('layout_columns', array('max' => 2, 'default' => 2) );
79
-
80
- add_meta_box( 'dum-global', __( 'Disable Updates Globally', 'disable-updates-manager' ), array( __CLASS__, 'metabox_global' ), self::$page_hook, 'left', 'core' );
81
- add_meta_box( 'dum-themes', __( 'Disable Theme Updates', 'disable-updates-manager' ), array( __CLASS__, 'metabox_themes' ), self::$page_hook, 'right', 'core' );
82
-
83
- add_meta_box( 'dum-other', __( 'Other Settings', 'disable-updates-manager' ), array( __CLASS__, 'metabox_other' ), self::$page_hook, 'left', 'core' );
84
- add_meta_box( 'dum-plugins', __( 'Disable Plugin Updates', 'disable-updates-manager' ), array( __CLASS__, 'metabox_plugins' ), self::$page_hook, 'right', 'core' );
85
- }
86
-
87
- static function enqueue_css() {
88
-
89
- // If SCRIPT_DEBUG is set and TRUE load the non-minified files, otherwise, load the minified files.
90
- $min = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
91
-
92
- wp_register_style( 'dum-chosen', plugins_url( "vendor/chosen/chosen$min.css", __FILE__ ), array(), '1.1.0' );
93
-
94
- wp_enqueue_style( 'disable-updates-manager', plugins_url( "assets/style$min.css", __FILE__ ), array( 'dum-chosen' ), self::VERSION );
95
- }
96
-
97
- static function enqueue_js() {
98
-
99
- // If SCRIPT_DEBUG is set and TRUE load the non-minified files, otherwise, load the minified files.
100
- $min = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
101
-
102
- wp_register_script( 'dum-admin-js', plugins_url( "assets/admin$min.js", __FILE__ ), array( 'postbox' ), self::VERSION );
103
-
104
- wp_enqueue_script( 'dum-chosen-js', plugins_url( "vendor/chosen/chosen.jquery$min.js", __FILE__ ), array( 'dum-admin-js' ), '1.1.0' );
105
- }
106
-
107
- static function footer_scripts() {
108
-
109
- ?>
110
- <script> postboxes.add_postbox_toggles(pagenow);</script>
111
- <?php
112
- }
113
-
114
- // Register settings.
115
- static function register_setting() {
116
-
117
- register_setting( '_disable_updates', '_disable_updates', array( __CLASS__, 'validate_settings' ) );
118
- }
119
-
120
- static function validate_settings( $value ) {
121
-
122
-
123
- if ( isset( $value['plugins'] ) ) {
124
-
125
-
126
- // Since the blocked plugins are stored in a different option, we need to update that option.
127
- $blocked_plugins = $value['plugins'];
128
-
129
-
130
- // Convert the data to match the way the options are stored.
131
- $blocked_plugins = array_fill_keys( $blocked_plugins, TRUE );
132
-
133
-
134
- } else {
135
-
136
-
137
- $blocked_plugins = array();
138
- }
139
-
140
-
141
- // Update the blocked plugins option.
142
- update_option( 'disable_updates_blocked', $blocked_plugins );
143
-
144
-
145
- return $value;
146
- }
147
-
148
- static function add_submenu() {
149
-
150
- $page_hook = add_submenu_page( 'options-general.php', 'Disable Updates Manager', __( 'Disable Updates Manager', 'disable-updates-manager' ), 'manage_options', 'disable-updates-manager', array( __CLASS__, 'display_page' ) );
151
-
152
- // Enqueue the admin CSS for this page only..
153
- add_action( "load-$page_hook", array( __CLASS__, 'enqueue_css' ) );
154
-
155
- // Enqueue the admin JS for this page only..
156
- add_action( "load-$page_hook", array( __CLASS__, 'enqueue_js' ) );
157
-
158
- // Add callbacks for this page only.
159
- add_action( "load-$page_hook", array( __CLASS__, 'page_actions' ), 9 );
160
- add_action( "admin_footer-$page_hook" , array( __CLASS__ , 'footer_scripts' ) );
161
- add_action( "load-$page_hook", array( __CLASS__, 'help_tab' ) );
162
-
163
- self::$page_hook = $page_hook;
164
- }
165
-
166
- static function action_links( $links ) {
167
-
168
- return array_merge(
169
- array(
170
- 'settings' => '<a href="' . add_query_arg( array( 'page' => 'disable-updates-manager' ), admin_url( 'options-general.php' ) ) . '">' . __( 'Configure', 'disable-updates-manager' ) . '</a>',
171
- ),
172
- $links
173
- );
174
-
175
- }
176
-
177
- static function meta_links( $links, $file ) {
178
-
179
- $plugin = plugin_basename( __FILE__ );
180
-
181
- if ( $file == $plugin ) {
182
-
183
- return array_merge(
184
- $links,
185
- array( '<a href="http://www.wordpress.org/support/plugin/stops-core-theme-and-plugin-updates">Support</a>' ),
186
- array( '<a href="http://www.wordpress.org/plugins/stops-core-theme-and-plugin-updates/faq/">FAQ</a>' ),
187
- array( '<a href="https://github.com/Websiteguy/disable-updates-manager">GitHub</a>' )
188
- );
189
- }
190
-
191
- return $links;
192
- }
193
-
194
- // Functions for plugin (Change in settings)
195
- static function load_disable_updates() {
196
-
197
- $status = get_option( '_disable_updates' );
198
-
199
- if ( ! $status ) {
200
- return;
201
- }
202
-
203
- foreach ( $status as $id => $value ) {
204
-
205
- switch ( $id ) {
206
-
207
- // Disable Plugin Updates
208
- case 'plugin' :
209
-
210
- self::disable_plugin_updates();
211
- break;
212
-
213
- // Disable Theme Updates
214
- case 'theme' :
215
-
216
- self::disable_theme_updates();
217
-
218
- break;
219
-
220
- // Disable WordPress Core Updates
221
- case 'core' :
222
-
223
- self::disable_core_updates();
224
-
225
- break;
226
-
227
- // Remove the Dashboard Updates Menu
228
- case 'page' :
229
-
230
- // Remove the Dashboard Updates Menu Code
231
- add_action( 'admin_init', create_function( '', 'remove_submenu_page( \'index.php\', \'update-core.php\' );' ) );
232
-
233
- break;
234
-
235
- // Disable All Updates
236
- case 'all' :
237
-
238
- // Disable Plugin Updates Only
239
- self::disable_plugin_updates();
240
-
241
- // Disable Theme Updates Only
242
- self::disable_theme_updates();
243
-
244
- // Disable Core Updates Only
245
- self::disable_core_updates();
246
-
247
- // Disable Debug E-mails
248
- add_filter( 'automatic_updates_send_debug_email ', '__return_false', 1 );
249
-
250
- // Disable WordPress Automatic Updates
251
- define( 'AUTOMATIC_UPDATER_DISABLED', TRUE );
252
- define( 'WP_AUTO_UPDATE_CORE', FALSE );
253
-
254
- break;
255
-
256
- // Remove WordPress Version Number
257
- case 'wpv' :
258
-
259
- add_filter( 'update_footer', '__return_empty_string', 11 );
260
-
261
- break;
262
-
263
- case 'ip' :
264
-
265
- if ( defined( 'disable_updates_loaded' ) ) {
266
- return;
267
- }
268
-
269
- define( 'disable_updates_loaded', 1 );
270
-
271
- add_action( 'init', array( __CLASS__, 'update_plugin_block_status' ) );
272
- add_filter( 'site_transient_update_plugins', array( __CLASS__, 'remove_plugin_update_notification' ) );
273
- add_filter( 'plugin_action_links', array( __CLASS__, 'plugin_block_action_link' ), 10, 4 );
274
-
275
- // remove blocked plugins from being checked for updates at wordpress.org
276
- add_filter( 'http_request_args', array( __CLASS__, 'http_request_args_plugins_filter' ), 5, 2 );
277
-
278
- break;
279
-
280
- case 'bnag' :
281
-
282
- if ( ! function_exists( 'c2c_no_browser_nag' ) ) :
283
-
284
- function c2c_no_browser_nag() {
285
- // This is cribbed from wp_check_browser_version()
286
- $key = md5( $_SERVER['HTTP_USER_AGENT'] );
287
- add_filter( 'site_transient_browser_' . $key, '__return_null' );
288
- }
289
-
290
- endif;
291
-
292
- add_action( 'admin_init', 'c2c_no_browser_nag' );
293
-
294
- break;
295
-
296
- case 'it':
297
-
298
- add_filter( 'site_transient_update_themes', array( __CLASS__, 'remove_theme_update_notification' ) );
299
-
300
- // remove blocked themes from being checked for updates at wordpress.org
301
- add_filter( 'http_request_args', array( __CLASS__, 'http_request_args_themes_filter' ), 5, 2 );
302
-
303
- break;
304
-
305
- // Disable automatic background updates.
306
- case 'abup' :
307
-
308
- wp_clear_scheduled_hook( 'wp_maybe_auto_update' );
309
- break;
310
-
311
- }
312
- }
313
- }
314
-
315
- static function update_plugin_block_status() {
316
-
317
- if ( ! current_user_can( 'update_plugins' ) ) {
318
- return;
319
- }
320
-
321
- // see if there are actions to process
322
- if ( ! isset( $_GET[ 'disable_updates' ] ) || ! isset( $_GET[ '_wpnonce' ] ) ) {
323
- return;
324
- }
325
-
326
- if ( ! wp_verify_nonce( $_GET[ '_wpnonce' ], 'disable_updates' ) ) {
327
- return;
328
- }
329
-
330
- $blocked = get_option( 'disable_updates_blocked' );
331
- // $plugins = get_site_transient( 'update_plugins' );
332
-
333
- // block action
334
- // if ( isset( $_GET[ 'block' ] ) && isset( $plugins->response ) && isset( $plugins->response[ $_GET[ 'block' ] ] ) ) {
335
- // $p = $plugins->response[ $_GET[ 'block' ] ];
336
- // $blocked[ $_GET[ 'block' ] ] = array( 'slug' => $p->slug, 'new_version' => $p->new_version );
337
- // }
338
- if ( isset( $_GET[ 'block' ] ) ) {
339
-
340
- $blocked[ $_GET[ 'block' ] ] = TRUE;
341
- }
342
-
343
- if ( isset( $_GET[ 'unblock' ] ) ) {
344
-
345
- unset( $blocked[ $_GET[ 'unblock' ] ] );
346
- }
347
-
348
- update_option( 'disable_updates_blocked', $blocked );
349
- }
350
-
351
- static function remove_plugin_update_notification( $plugins ) {
352
-
353
- if ( ! isset( $plugins->response ) || count( $plugins->response ) == 0 ) {
354
-
355
- return $plugins;
356
- }
357
-
358
- $blocked = (array) get_option( 'disable_updates_blocked' );
359
-
360
- // foreach ( $blocked as $filename => $plugin ) {
361
-
362
- // if ( isset( $plugins->response[ $filename ] )
363
- // && $plugins->response[ $filename ]->new_version == $plugin[ 'new_version' ]
364
- // ) {
365
-
366
- // $plugins->disable_updates[ $filename ] = $plugins->response[ $filename ];
367
- // unset( $plugins->response[ $filename ] );
368
- // }
369
- // }
370
- foreach ( $blocked as $filename => $plugin ) {
371
-
372
- if ( isset( $plugins->response[ $filename ] ) && $plugin == TRUE ) {
373
-
374
- $plugins->disable_updates[ $filename ] = $plugins->response[ $filename ];
375
- unset( $plugins->response[ $filename ] );
376
- }
377
- }
378
-
379
- return $plugins;
380
- }
381
-
382
- static function remove_theme_update_notification( $themes ) {
383
-
384
- $options = get_option( '_disable_updates' );
385
-
386
- if ( FALSE === $options ) {
387
-
388
- return $themes;
389
- }
390
-
391
- if ( isset( $options['themes'] ) ) {
392
-
393
- $blocked = $options['themes'];
394
-
395
- } else {
396
-
397
- return $themes;
398
- }
399
-
400
- if ( 0 === (int) count( $blocked ) ) {
401
-
402
- return $themes;
403
- }
404
-
405
- if ( ! isset( $themes->response ) || count( $themes->response ) == 0 ) {
406
-
407
- return $themes;
408
- }
409
-
410
- foreach ( $blocked as $theme ) {
411
-
412
- if ( isset( $themes->response[ $theme ] ) ) {
413
-
414
- $themes->disable_updates[ $theme ] = $themes->response[ $theme ];
415
- unset( $themes->response[ $theme ] );
416
- }
417
- }
418
-
419
- return $themes;
420
- }
421
-
422
- static function last_checked() {
423
- global $wp_version;
424
-
425
- return (object) array(
426
- 'last_checked' => time(),
427
- 'updates' => array(),
428
- 'version_checked' => $wp_version,
429
- );
430
- }
431
-
432
- // Disable Core Updates
433
- static function disable_core_updates() {
434
-
435
- # 2.3 to 2.7:
436
- add_action( 'init', create_function( '', 'remove_action( \'init\', \'wp_version_check\' );' ), 2 );
437
- add_filter( 'pre_option_update_core', '__return_null' );
438
-
439
- # 2.8 to 3.0:
440
- remove_action( 'wp_version_check', 'wp_version_check' );
441
- remove_action( 'admin_init', '_maybe_update_core' );
442
- add_filter( 'pre_transient_update_core', array( __CLASS__,'last_checked' ) );
443
-
444
- # >3.0:
445
- remove_action( 'load-update-core.php', 'wp_update_core' );
446
- add_filter( 'pre_site_transient_update_core', array( __CLASS__,'last_checked' ) );
447
-
448
- // Hide Update Notices in Admin Dashboard
449
- add_action( 'admin_menu', create_function( '', 'remove_action( \'admin_notices\', \'update_nag\', 3 );' ) );
450
-
451
- wp_clear_scheduled_hook( 'wp_version_check' );
452
-
453
- // Disable email.
454
- add_filter( 'auto_core_update_send_email', '__return_false' );
455
-
456
- // This doesn't make sense. Purpose?
457
- // apply_filters( 'automatic_core_updates_send_debug_email', TRUE, $type, $core_update, $result );
458
- }
459
-
460
- // Disable Plugin Updates
461
- static function disable_plugin_updates() {
462
-
463
- # 2.3 to 2.7:
464
- // add_action( 'admin_menu', create_function( '$a', "remove_action( 'load-plugins.php', 'wp_update_plugins' );") );
465
- // add_action( 'admin_init', create_function( '$a', "remove_action( 'admin_init', 'wp_update_plugins' );"), 2 );
466
- // add_action( 'init', create_function( '$a', "remove_action( 'init', 'wp_update_plugins' );"), 2 );
467
- add_filter( 'pre_option_update_plugins', '__return_null' );
468
-
469
- # 2.8 to 3.0:
470
- remove_action( 'load-plugins.php', 'wp_update_plugins' );
471
- remove_action( 'load-update.php', 'wp_update_plugins' );
472
- remove_action( 'admin_init', '_maybe_update_plugins' );
473
- remove_action( 'wp_update_plugins', 'wp_update_plugins' );
474
- add_filter( 'pre_transient_update_plugins', array( __CLASS__,'last_checked' ) );
475
-
476
- # >3.0:
477
- remove_action( 'load-update-core.php', 'wp_update_plugins' );
478
- add_filter( 'pre_site_transient_update_plugins', array( __CLASS__,'last_checked' ) );
479
-
480
- wp_clear_scheduled_hook( 'wp_update_plugins' );
481
-
482
- // Disable Plugin Update E-mails (only works for some plugins)
483
- // This doesn't make sense. Purpose?
484
- // apply_filters( 'auto_plugin_update_send_email', FALSE, $type, $plugin_update, $result );
485
-
486
- // This doesn't make sense. Purpose?
487
- // apply_filters( 'automatic_plugin_updates_send_debug_email', TRUE, $type, $plugin_update, $result );
488
- }
489
-
490
- // Disable Theme Updates
491
- static function disable_theme_updates() {
492
-
493
- # 2.8 to 3.0:
494
- remove_action( 'load-themes.php', 'wp_update_themes' );
495
- remove_action( 'load-update.php', 'wp_update_themes' );
496
- remove_action( 'admin_init', '_maybe_update_themes' );
497
- remove_action( 'wp_update_themes', 'wp_update_themes' );
498
- add_filter( 'pre_transient_update_themes', array( __CLASS__,'last_checked' ) );
499
-
500
- # >3.0:
501
- remove_action( 'load-update-core.php', 'wp_update_themes' );
502
- add_filter( 'pre_site_transient_update_themes', array( __CLASS__,'last_checked' ) );
503
-
504
- wp_clear_scheduled_hook( 'wp_update_themes' );
505
-
506
- // Disable Theme Update E-mails (only works for some plugins)
507
- // This doesn't make sense. Purpose?
508
- // apply_filters( 'auto_theme_update_send_email', FALSE, $type, $theme_update, $result );
509
-
510
- // This doesn't make sense. Purpose?
511
- // apply_filters( 'automatic_theme_updates_send_debug_email', TRUE, $type, $theme_update, $result );
512
- }
513
-
514
- static function plugin_block_action_link( $actions, $plugin_file, $plugin_data, $context ) {
515
-
516
- $blocked = get_option( 'disable_updates_blocked' );
517
-
518
- if ( $blocked !== FALSE && array_key_exists( $plugin_file, $blocked ) ) {
519
-
520
- $actions[] = '<a class="delete" href="plugins.php?_wpnonce=' . wp_create_nonce( 'disable_updates' ) . '&disable_updates&unblock=' . $plugin_file . '">Unblock Updates</a>';
521
-
522
- } else {
523
-
524
- $actions[] = '<a class="delete" href="plugins.php?_wpnonce=' . wp_create_nonce( 'disable_updates' ) . '&disable_updates&block=' . $plugin_file . '">Block Updates</a>';
525
- }
526
-
527
- return $actions;
528
- }
529
-
530
- static function http_request_args_plugins_filter( $r, $url ) {
531
-
532
- if ( 0 !== strpos( $url, 'https://api.wordpress.org/plugins/update-check/1.1/' ) ) {
533
-
534
- return $r;
535
- }
536
-
537
- $blocked = get_option( 'disable_updates_blocked' );
538
- $blocked = (array) array_keys( $blocked );
539
-
540
- if ( 0 === (int) count( $blocked ) ) {
541
-
542
- return $r;
543
- }
544
-
545
- if ( ! isset( $r['body']['plugins'] ) ) {
546
-
547
- return $r;
548
- }
549
-
550
- $plugins = json_decode( $r['body']['plugins'], TRUE );
551
-
552
- foreach ( $blocked as $p ) {
553
-
554
- if ( isset( $plugins['plugins'][ $p ] ) ) unset( $plugins['plugins'][ $p ] );
555
- if ( FALSE !== $key = array_search( $p, $plugins['active'] ) ) unset( $plugins['active'][ $key ] );
556
- }
557
-
558
- $r['body']['plugins'] = json_encode( $plugins );
559
-
560
- return $r;
561
- }
562
-
563
- static function http_request_args_themes_filter( $r, $url ) {
564
-
565
- if ( 0 !== strpos( $url, 'https://api.wordpress.org/themes/update-check/1.1/' ) ) {
566
-
567
- return $r;
568
- }
569
-
570
- $options = get_option( '_disable_updates' );
571
-
572
- if ( FALSE === $options ) {
573
-
574
- return $r;
575
- }
576
-
577
- if ( isset( $options['themes'] ) ) {
578
-
579
- $blocked = $options['themes'];
580
-
581
- } else {
582
-
583
- return $r;
584
- }
585
-
586
- if ( 0 === (int) count( $blocked ) ) {
587
-
588
- return $r;
589
- }
590
-
591
- if ( ! isset( $r['body']['themes'] ) ) {
592
-
593
- return $r;
594
- }
595
-
596
- $themes = json_decode( $r['body']['themes'], TRUE );
597
-
598
- foreach ( $blocked as $t ) {
599
-
600
- if ( isset( $themes['themes'][ $t ] ) ) unset( $themes['themes'][ $t ] );
601
- }
602
-
603
- $r['body']['themes'] = json_encode( $themes );
604
-
605
- return $r;
606
- }
607
-
608
- // Help Tab
609
- static function help_tab() {
610
- global $test_help_page;
611
-
612
- $screen = get_current_screen();
613
- $content1 = <<<CONTENT1
614
- <p>
615
- This is the Disable Updates Manager settings help tab. In here you will find helpful information on what Disable Updates Manager does and how to use it.
616
- </p>
617
-
618
- <div class="updated" id="update">
619
- <p>Please take the time to <a href="https://wordpress.org/support/view/plugin-reviews/stops-core-theme-and-plugin-updates?rate=5#postform">rate this plugin</a> according.</p>
620
- </div>
621
-
622
- <div class="error" id="error">
623
- <p><strong>Please Note! - </strong>If either your WordPress core, theme, or plugins get too out
624
- of date, you may run into compatibility problems. Check the capability tab for more information.</p>
625
- </div>
626
-
627
- CONTENT1;
628
-
629
- $content2 = <<<CONTENT2
630
- <div><br></div>
631
- <div id="column1">
632
- <iframe width="310" height="174" src="//www.youtube.com/embed/gm03k-Oxt38?rel=0" frameborder="0" allowfullscreen></iframe>
633
- </div>
634
-
635
- <div id="column2">
636
- <iframe width="310" height="174" src="//www.youtube.com/embed/9vPVis3NZHI?rel=0" frameborder="0" allowfullscreen></iframe>
637
- </div>
638
-
639
- CONTENT2;
640
-
641
- $content3 = <<<CONTENT3
642
- <p>
643
- <a href="http://mpswp.wordpress.com">Our Website</a>
644
- <br>
645
- <a href="http://wordpress.org/support/plugin/stops-core-theme-and-plugin-updates">Support on WordPress</a>
646
- <br>
647
- <a href="http://wordpress.org/plugins/stops-core-theme-and-plugin-updates/faq/">FAQ</a>
648
- <br>
649
- <a href="https://github.com/Websiteguy/disable-updates-manager">GitHub Repository</a>
650
- </p>
651
-
652
- CONTENT3;
653
-
654
- $content4 = <<<CONTENT4
655
- <p>
656
- You can use the following controls to arrange the settings to suit your workflow.
657
- <br>
658
- <br>
659
- <strong>Screen Options</strong> - Use the Screen Options tab to choose which boxes to show.
660
- <br>
661
- <br>
662
- <strong>Drag and Drop</strong> - To rearrange the boxes, drag and drop by clicking on the title bar of the selected box and releasing when you see a gray dotted-line rectangle appear in the location you want to place the box.
663
- <br>
664
- <br>
665
- <strong>Box Controls</strong> - Click the title bar of the box to expand or collapse it.
666
- <br>
667
- <br>
668
- <strong>Chosen</strong> - Check the Disable Themes Individually setting and/or the Disable Plugins Individually settings to enable the chosen multiply select box.
669
- <br>
670
- <br>
671
- <strong>Tooltips</strong> - If you are having trouble figuring out how a setting works, just wave over the "?". It will display a little bubble with helpful information.
672
- </p>
673
-
674
- CONTENT4;
675
-
676
- $content5 = <<<CONTENT5
677
-
678
- <p style="align: center;">
679
- <h3>Contributors:</h3>
680
- <ul>
681
- <h4>Head Contributors</h4>
682
- <li><a href="http://profiles.wordpress.org/kidsguide/">Matthew</a></li>
683
- <li><a href="http://profiles.wordpress.org/mps-plugins/">MPS Plugins</a></li>
684
- <li><a href="http://profiles.wordpress.org/shazahm1hotmailcom/">Shazahm1</a></li>
685
- <h4>Other Contributors</h4>
686
- <li><a href="http://profiles.wordpress.org/szepeviktor/">szepe.viktor</a></li>
687
- </ul>
688
- </p>
689
-
690
- CONTENT5;
691
-
692
- $content6 = <<<CONTENT6
693
- <p>
694
- WordPress encourages you to update your plugins, themes, and core to make sure that there are no bugs. Even though you most likely want to disable all the updates and never update again, you should update every once in a while.
695
-
696
- <h3>This plugin is tested so there are no problems.</h3>
697
- <ul>
698
- <li>Tested with WordPress 4.0</li>
699
- <li>Tested with popular plugins for no conflicts</li>
700
- <li>Tested with popular themes for no conflicts</li>
701
- </ul>
702
- </p>
703
-
704
- CONTENT6;
705
-
706
- // Add my_help_tab if current screen is My Admin Page
707
- $screen->add_help_tab(array(
708
- 'id' => 'help_tab_content_1',
709
- 'title' => __('Overview'),
710
- 'content' => $content1,
711
- ));
712
-
713
- $screen->add_help_tab(array(
714
- 'id' => 'help_tab_content_4',
715
- 'title' => __('Layout'),
716
- 'content' => $content4,
717
- ));
718
-
719
- $screen->add_help_tab(array(
720
- 'id' => 'help_tab_content_2',
721
- 'title' => __('Tutorials'),
722
- 'content' => $content2,
723
- ));
724
-
725
- $screen->add_help_tab(array(
726
- 'id' => 'help_tab_content_6',
727
- 'title' => __('Capability'),
728
- 'content' => $content6,
729
- ));
730
-
731
- $screen->add_help_tab(array(
732
- 'id' => 'help_tab_content_3',
733
- 'title' => __('Troubleshooting'),
734
- 'content' => $content3,
735
- ));
736
-
737
- $screen->set_help_sidebar($content5);
738
-
739
- }
740
-
741
- static function metabox_global( $status ) {
742
-
743
- ?>
744
- <div>
745
- <p>
746
- <div class="showonhover">
747
- <label for="all_notify">
748
- <input
749
- type="checkbox" <?php checked( 1, ( isset( $status['all'] ) ? (int) $status['all'] : 0 ), TRUE ); ?>
750
- value="1" id="all_notify"
751
- name="_disable_updates[all]"> <?php _e( 'Disable All Updates', 'disable-updates-manager' ) ?>
752
- </label>
753
- <span>
754
- <a href="#" class="viewdescription">?</a>
755
- <span class="hovertext">Disables core, theme, and plugin updates.</span>
756
- </span>
757
- </div>
758
- </p>
759
- </div>
760
-
761
- <div style="padding-left: 12px;">
762
- <p>
763
- <div>
764
- <label for="plugins_notify">
765
- <input type="checkbox" <?php checked( 1, ( isset( $status['plugin'] ) && ! isset( $status['all'] ) ? (int) $status['plugin'] : 0 ), TRUE ); ?>
766
- value="1" id="plugins_notify"
767
- name="_disable_updates[plugin]"
768
- <?php disabled( 1, ( isset( $status['all'] ) ? (int) $status['all'] : 0 ) ) ?>> <?php _e( 'Disable All Plugin Updates', 'disable-updates-manager' ) ?>
769
- </label>
770
- </div>
771
- <br>
772
- <div>
773
- <label for="themes_notify">
774
- <input type="checkbox" <?php checked( 1, ( isset( $status['theme'] ) && ! isset( $status['all'] ) ? (int) $status['theme'] : 0 ), TRUE ); ?>
775
- value="1" id="themes_notify"
776
- name="_disable_updates[theme]"
777
- <?php disabled( 1, ( isset( $status['all'] ) ? (int) $status['all'] : 0 ) ) ?>> <?php _e( 'Disable All Theme Updates', 'disable-updates-manager' ) ?>
778
- </label>
779
- </div>
780
- <br>
781
- <div>
782
- <label for="core_notify">
783
- <input type="checkbox" <?php checked( 1, ( isset( $status['core'] ) && ! isset( $status['all'] ) ? (int) $status['core'] : 0 ), TRUE ); ?>
784
- value="1" id="core_notify"
785
- name="_disable_updates[core]"
786
- <?php disabled( 1, ( isset( $status['all'] ) ? (int) $status['all'] : 0 ) ) ?>> <?php _e( 'Disable WordPress Core Update', 'disable-updates-manager' ) ?>
787
- </label>
788
- </div>
789
- </p>
790
- </div>
791
-
792
- <?php
793
- }
794
-
795
- static function metabox_other( $status ) {
796
-
797
- ?>
798
- <div>
799
- <p>
800
- <div class="showonhover">
801
- <label for="page_notify">
802
- <input
803
- type="checkbox" <?php checked( 1, ( isset( $status['page'] ) ? (int) $status['page'] : 0 ), TRUE ); ?>
804
- value="1" id="page_notify"
805
- name="_disable_updates[page]"> <?php _e( 'Remove Updates Page', 'disable-updates-manager' ) ?>
806
- </label>
807
- <span>
808
- <a href="#" class="viewdescription">?</a></a>
809
- <span class="hovertext">The page under the Dashboard tab.</span>
810
- </span>
811
- </div>
812
- <br>
813
- <div class="showonhover">
814
- <label for="bnag_notify">
815
- <input type="checkbox" <?php checked( 1, ( isset( $status['bnag'] ) ? (int) $status['bnag'] : 0 ), TRUE ); ?>
816
- value="1" id="bnag_notify"
817
- name="_disable_updates[bnag]"> <?php _e( 'Remove Out of Date Browser Nag', 'disable-updates-manager' ) ?>
818
- </label>
819
- <span>
820
- <a href="#" class="viewdescription">?</a>
821
- <span class="hovertext">Removes the browsers is out of date notification in you WordPress dashboard.</span>
822
- </span>
823
- </div>
824
- <br>
825
- <div class="showonhover">
826
- <label for="wpv_notify">
827
- <input
828
- type="checkbox" <?php checked( 1, ( isset( $status['wpv'] ) ? (int) $status['wpv'] : 0 ), TRUE ); ?>
829
- value="1" id="wpv_notify"
830
- name="_disable_updates[wpv]"> <?php _e( 'Remove WordPress Core Version from Footer', 'disable-updates-manager' ) ?>
831
- </label>
832
- <span>
833
- <a href="#" class="viewdescription">?</a>
834
- <span class="hovertext">Removes it for all users.</span>
835
- </span>
836
- </div>
837
- <br>
838
- <div>
839
- <label for="abup_notify">
840
- <input type="checkbox" <?php checked( 1, ( isset( $status['abup'] ) ? (int) $status['abup'] : 0 ), TRUE ); ?>
841
- value="1" id="abup_notify"
842
- name="_disable_updates[abup]"> <?php _e( 'Disable Automatic Background Updates', 'disable-updates-manager' ) ?>
843
- </label>
844
- </p>
845
- </div>
846
- </div>
847
-
848
- <?php
849
- }
850
-
851
- static function metabox_themes( $status ) {
852
-
853
- ?>
854
- <div>
855
- <p>
856
- <div class="showonhover">
857
- <label for="dum-disable-themes">
858
- <input type="checkbox" <?php checked( 1, ( isset( $status['it'] ) && ! isset( $status['all'] ) ? (int) $status['it'] : 0 ), TRUE ); ?>
859
- id="dum-disable-themes"
860
- value="1"
861
- name="_disable_updates[it]"
862
- <?php disabled( 1, ( isset( $status['all'] ) ? (int) $status['all'] : 0 ) ) ?>> <?php _e( 'Disable Themes Individually', 'disable-updates-manager' ) ?>
863
- </label>
864
- <span>
865
- <a href="#" class="viewdescription">?</a>
866
- <span class="hovertext">Enabling this option will show the list of themes to disable updates.</span>
867
- </span>
868
- </p>
869
- </div>
870
- </div>
871
- <?php
872
-
873
- $themes = wp_get_themes( array( 'allowed' => TRUE ) );
874
-
875
- if ( ! empty( $themes ) ) {
876
-
877
- echo '<select class="dum-enhanced-select" id="dum-disable-themes-select" name="_disable_updates[themes][]" data-placeholder="' . __( 'Select themes to disable...', 'disable-updates-manager' ) . '" multiple' . ( isset( $status['it'] ) && ! isset( $status['all'] ) ? '' : ' disabled' ) . '>';
878
-
879
- echo '<option value=""></option>';
880
-
881
- foreach ( $themes as $slug => $theme ) {
882
-
883
- printf( '<option value="%1$s"%2$s>%3$s</option>',
884
- esc_attr( $slug ),
885
- ! isset( $status['all'] ) && isset( $status['it'] ) && isset( $status['themes'] ) && in_array( $slug, $status['themes'] ) ? ' SELECTED' : '',
886
- esc_html( $theme->name )
887
- );
888
- }
889
-
890
- echo '</select>';
891
- }
892
-
893
- }
894
-
895
- static function metabox_plugins( $status ) {
896
-
897
- ?>
898
- <p>
899
- <div class="showonhover">
900
- <label for="dum-disable-plugins">
901
- <input type="checkbox" <?php checked( 1, ( isset( $status['ip'] ) && ! isset( $status['all'] ) ? (int) $status['ip'] : 0 ), TRUE ); ?>
902
- id="dum-disable-plugins"
903
- value="1"
904
- name="_disable_updates[ip]"
905
- <?php disabled( 1, ( isset( $status['all'] ) ? (int) $status['all'] : 0 ) ) ?>> <?php _e( 'Disable Plugins Individually', 'disable-updates-manager' ) ?>
906
- </label>
907
- <span>
908
- <a href="#" class="viewdescription">?</a>
909
- <span class="hovertext">Enabling this option will show the list of plugins to disable updates.</span>
910
- </span>
911
- </p>
912
- </div>
913
-
914
- <?php
915
-
916
- $plugins = get_plugins();
917
- $blocked = get_option( 'disable_updates_blocked' );
918
-
919
- if ( ! empty( $plugins ) ) {
920
-
921
- echo '<select class="dum-enhanced-select" id="dum-disable-plugins-select" name="_disable_updates[plugins][]" data-placeholder="' . __( 'Select plugins to disable...', 'disable-updates-manager' ) . '" multiple' . ( isset( $status['ip'] ) && ! isset( $status['all'] ) ? '' : ' disabled' ) . '>';
922
-
923
- echo '<option value=""></option>';
924
-
925
- foreach ( $plugins as $slug => $plugin ) {
926
-
927
- printf( '<option value="%1$s"%2$s>%3$s</option>',
928
- esc_attr( $slug ),
929
- ! isset( $status['all'] ) && isset( $status['ip'] ) && array_key_exists( $slug, (array) $blocked ) ? ' SELECTED' : '',
930
- esc_attr( $plugin['Name'] )
931
- );
932
- }
933
-
934
- echo '</select>';
935
- }
936
-
937
- }
938
-
939
- // Settings page (under dashboard).
940
- static function display_page() {
941
- ?>
942
-
943
- <h2><?php _e( 'Disable Updates Manager', 'disable-updates-manager' ); ?></h2>
944
-
945
- <?php
946
-
947
- if ( !current_user_can('manage_options') ) {
948
- wp_die('You do not have sufficient permissions to access this page.');
949
- }
950
-
951
- if ( current_user_can('manage_options') ) {
952
-
953
- $status = get_option( '_disable_updates' );
954
-
955
- ?>
956
-
957
- <div class="dashboard-widgets-wrap">
958
-
959
- <div id="dashboard-widgets" class="metabox-holder columns-<?php echo 1 == get_current_screen()->get_columns() ? '1' : '2'; ?>">
960
-
961
- <form name="dum-options" method="post" action="options.php">
962
- <input type="hidden" name="action" value="dum-update-options">
963
- <?php wp_nonce_field( 'dum-update-options-nonce' );
964
-
965
- /* Used to save closed metaboxes and their order */
966
- wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', FALSE );
967
- wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', FALSE ); ?>
968
-
969
- <div class="postbox-container">
970
- <?php do_meta_boxes( self::$page_hook, 'left', $status ); ?>
971
- </div>
972
-
973
- <div class="postbox-container">
974
- <?php do_meta_boxes( self::$page_hook, 'right', $status ); ?>
975
- <?php //do_meta_boxes( self::$page_hook, 'advanced', $status ); ?>
976
- </div>
977
-
978
- <?php settings_fields( '_disable_updates' ); ?>
979
-
980
- <p class="submit clear">
981
- <input type="submit" class="button-primary" value="<?php _e( 'Update Settings' ) ?>"/>
982
- </p>
983
-
984
- </form>
985
-
986
- </div><!-- #dashboard-widgets -->
987
-
988
- </div><!-- .dashboard-widgets-wrap -->
989
-
990
- <?php
991
- }
992
- }
993
-
994
- }
995
-
996
- global $Disable_Updates;
997
- $Disable_Updates = new Disable_Updates();
998
-
999
- if ( ! function_exists( 'printr' ) ) {
1000
- function printr( $txt ) {
1001
- echo '<pre>';
1002
- print_r( $txt );
1003
- echo '</pre>';
1004
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1005
  }
1
+ <?php
2
+ /*
3
+ * @package Disable Updates Manager
4
+ * @author MPS Plugins
5
+ * @email mpsplugins@gmail.com
6
+ * @version 4.6.0
7
+ */
8
+ /*
9
+ Plugin Name: Disable Updates Manager
10
+ Plugin URI: http://www.mpswp.wordpress.com
11
+ Version: 4.6.0
12
+ Description: A configurable plugin that disables updates for you. Easy, clean and helpful.
13
+ Author: MPS Plugins
14
+ Author URI: http://www.mpswp.wordpress.com
15
+ Author Email: mpsplugins@gmail.com
16
+ License: GPL2
17
+ Text Domain: disable-updates-manager
18
+ Domain Path: languages
19
+
20
+ @Copyright 2013 - 2014 MPS Plugins (email: mpsplugins@gmail.com)
21
+
22
+ This program is free software; you can redistribute it and/or modify
23
+ it under the terms of the GNU General Public License, version 2, as
24
+ published by the Free Software Foundation.
25
+
26
+ This program is distributed in the hope that it will be useful,
27
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
28
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29
+ GNU General Public License for more details.
30
+
31
+ You should have received a copy of the GNU General Public License
32
+ along with this program; if not, write to the Free Software
33
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
34
+
35
+ Go to the license.txt in the trunk for more information.
36
+ */
37
+
38
+ class Disable_Updates {
39
+
40
+ // Define version.
41
+ const VERSION = '4.6.0';
42
+
43
+ private static $page_hook = '';
44
+
45
+ function __construct() {
46
+
47
+ // Load our textdomain
48
+ add_action( 'init', array( __CLASS__ , 'load_textdomain' ) );
49
+
50
+ // Add menu page.
51
+ add_action( 'admin_menu', array( __CLASS__, 'add_submenu' ) );
52
+
53
+ // Settings API.
54
+ add_action( 'admin_init', array( __CLASS__, 'register_setting' ) );
55
+
56
+ // Add action links.
57
+ add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), array( __CLASS__, 'action_links' ) );
58
+
59
+ // Add meta links.
60
+ add_filter( 'plugin_row_meta', array( __CLASS__, 'meta_links' ), 10, 2 );
61
+
62
+ // load the values recorded.
63
+ $this->load_disable_updates();
64
+ }
65
+
66
+ static function load_textdomain() {
67
+
68
+ load_plugin_textdomain( 'disable-updates-manager', FALSE, basename( dirname( __FILE__ ) ) . '/lang' );
69
+
70
+ }
71
+
72
+ static function page_actions() {
73
+
74
+ do_action( 'add_meta_boxes_' . self::$page_hook, NULL );
75
+ do_action( 'add_meta_boxes', self::$page_hook, NULL );
76
+
77
+ // User can choose between 1 or 2 columns (default 2)
78
+ add_screen_option('layout_columns', array('max' => 2, 'default' => 2) );
79
+
80
+ add_meta_box( 'dum-global', __( 'Disable Updates Globally', 'disable-updates-manager' ), array( __CLASS__, 'metabox_global' ), self::$page_hook, 'left', 'core' );
81
+ add_meta_box( 'dum-themes', __( 'Disable Theme Updates', 'disable-updates-manager' ), array( __CLASS__, 'metabox_themes' ), self::$page_hook, 'right', 'core' );
82
+
83
+ add_meta_box( 'dum-other', __( 'Other Settings', 'disable-updates-manager' ), array( __CLASS__, 'metabox_other' ), self::$page_hook, 'left', 'core' );
84
+ add_meta_box( 'dum-plugins', __( 'Disable Plugin Updates', 'disable-updates-manager' ), array( __CLASS__, 'metabox_plugins' ), self::$page_hook, 'right', 'core' );
85
+ }
86
+
87
+ static function enqueue_css() {
88
+
89
+ // If SCRIPT_DEBUG is set and TRUE load the non-minified files, otherwise, load the minified files.
90
+ $min = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
91
+
92
+ wp_register_style( 'dum-chosen', plugins_url( "vendor/chosen/chosen$min.css", __FILE__ ), array(), '1.1.0' );
93
+
94
+ wp_enqueue_style( 'disable-updates-manager', plugins_url( "assets/style$min.css", __FILE__ ), array( 'dum-chosen' ), self::VERSION );
95
+ }
96
+
97
+ static function enqueue_js() {
98
+
99
+ // If SCRIPT_DEBUG is set and TRUE load the non-minified files, otherwise, load the minified files.
100
+ $min = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
101
+
102
+ wp_register_script( 'dum-admin-js', plugins_url( "assets/admin$min.js", __FILE__ ), array( 'postbox' ), self::VERSION );
103
+
104
+ wp_enqueue_script( 'dum-chosen-js', plugins_url( "vendor/chosen/chosen.jquery$min.js", __FILE__ ), array( 'dum-admin-js' ), '1.1.0' );
105
+ }
106
+
107
+ static function footer_scripts() {
108
+
109
+ ?>
110
+ <script> postboxes.add_postbox_toggles(pagenow);</script>
111
+ <?php
112
+ }
113
+
114
+ // Register settings.
115
+ static function register_setting() {
116
+
117
+ register_setting( '_disable_updates', '_disable_updates', array( __CLASS__, 'validate_settings' ) );
118
+ }
119
+
120
+ static function validate_settings( $value ) {
121
+
122
+
123
+ if ( isset( $value['plugins'] ) ) {
124
+
125
+
126
+ // Since the blocked plugins are stored in a different option, we need to update that option.
127
+ $blocked_plugins = $value['plugins'];
128
+
129
+
130
+ // Convert the data to match the way the options are stored.
131
+ $blocked_plugins = array_fill_keys( $blocked_plugins, TRUE );
132
+
133
+
134
+ } else {
135
+
136
+
137
+ $blocked_plugins = array();
138
+ }
139
+
140
+
141
+ // Update the blocked plugins option.
142
+ update_option( 'disable_updates_blocked', $blocked_plugins );
143
+
144
+
145
+ return $value;
146
+ }
147
+
148
+ static function add_submenu() {
149
+
150
+ $page_hook = add_submenu_page( 'options-general.php', 'Disable Updates Manager', __( 'Disable Updates Manager', 'disable-updates-manager' ), 'manage_options', 'disable-updates-manager', array( __CLASS__, 'display_page' ) );
151
+
152
+ // Enqueue the admin CSS for this page only..
153
+ add_action( "load-$page_hook", array( __CLASS__, 'enqueue_css' ) );
154
+
155
+ // Enqueue the admin JS for this page only..
156
+ add_action( "load-$page_hook", array( __CLASS__, 'enqueue_js' ) );
157
+
158
+ // Add callbacks for this page only.
159
+ add_action( "load-$page_hook", array( __CLASS__, 'page_actions' ), 9 );
160
+ add_action( "admin_footer-$page_hook" , array( __CLASS__ , 'footer_scripts' ) );
161
+ add_action( "load-$page_hook", array( __CLASS__, 'help_tab' ) );
162
+
163
+ self::$page_hook = $page_hook;
164
+ }
165
+
166
+ static function action_links( $links ) {
167
+
168
+ return array_merge(
169
+ array(
170
+ 'settings' => '<a href="' . add_query_arg( array( 'page' => 'disable-updates-manager' ), admin_url( 'options-general.php' ) ) . '">' . __( 'Configure', 'disable-updates-manager' ) . '</a>',
171
+ ),
172
+ $links
173
+ );
174
+
175
+ }
176
+
177
+ static function meta_links( $links, $file ) {
178
+
179
+ $plugin = plugin_basename( __FILE__ );
180
+
181
+ if ( $file == $plugin ) {
182
+
183
+ return array_merge(
184
+ $links,
185
+ array( '<a href="http://www.wordpress.org/support/plugin/stops-core-theme-and-plugin-updates">Support</a>' ),
186
+ array( '<a href="https://github.com/Websiteguy/disable-updates-manager">GitHub</a>' )
187
+ );
188
+ }
189
+
190
+ return $links;
191
+ }
192
+
193
+ // Functions for plugin (Change in settings)
194
+ static function load_disable_updates() {
195
+
196
+ $status = get_option( '_disable_updates' );
197
+
198
+ if ( ! $status ) {
199
+ return;
200
+ }
201
+
202
+ foreach ( $status as $id => $value ) {
203
+
204
+ switch ( $id ) {
205
+
206
+ // Disable Plugin Updates
207
+ case 'plugin' :
208
+
209
+ self::disable_plugin_updates();
210
+ break;
211
+
212
+ // Disable Theme Updates
213
+ case 'theme' :
214
+
215
+ self::disable_theme_updates();
216
+
217
+ break;
218
+
219
+ // Disable WordPress Core Updates
220
+ case 'core' :
221
+
222
+ self::disable_core_updates();
223
+
224
+ break;
225
+
226
+ // Remove the Dashboard Updates Menu
227
+ case 'page' :
228
+
229
+ // Remove the Dashboard Updates Menu Code
230
+ add_action( 'admin_init', create_function( '', 'remove_submenu_page( \'index.php\', \'update-core.php\' );' ) );
231
+
232
+ break;
233
+
234
+ // Disable All Updates
235
+ case 'all' :
236
+
237
+ // Disable Plugin Updates Only
238
+ self::disable_plugin_updates();
239
+
240
+ // Disable Theme Updates Only
241
+ self::disable_theme_updates();
242
+
243
+ // Disable Core Updates Only
244
+ self::disable_core_updates();
245
+
246
+ // Disable Debug E-mails
247
+ add_filter( 'automatic_updates_send_debug_email ', '__return_false', 1 );
248
+
249
+ // Disable WordPress Automatic Updates
250
+ define( 'AUTOMATIC_UPDATER_DISABLED', TRUE );
251
+ define( 'WP_AUTO_UPDATE_CORE', FALSE );
252
+
253
+ break;
254
+
255
+ // Remove WordPress Version Number
256
+ case 'wpv' :
257
+
258
+ add_filter( 'update_footer', '__return_empty_string', 11 );
259
+
260
+ break;
261
+
262
+ case 'ip' :
263
+
264
+ if ( defined( 'disable_updates_loaded' ) ) {
265
+ return;
266
+ }
267
+
268
+ define( 'disable_updates_loaded', 1 );
269
+
270
+ add_action( 'init', array( __CLASS__, 'update_plugin_block_status' ) );
271
+ add_filter( 'site_transient_update_plugins', array( __CLASS__, 'remove_plugin_update_notification' ) );
272
+ add_filter( 'plugin_action_links', array( __CLASS__, 'plugin_block_action_link' ), 10, 4 );
273
+
274
+ // remove blocked plugins from being checked for updates at wordpress.org
275
+ add_filter( 'http_request_args', array( __CLASS__, 'http_request_args_plugins_filter' ), 5, 2 );
276
+
277
+ break;
278
+
279
+ case 'bnag' :
280
+
281
+ if ( ! function_exists( 'c2c_no_browser_nag' ) ) :
282
+
283
+ function c2c_no_browser_nag() {
284
+ // This is cribbed from wp_check_browser_version()
285
+ $key = md5( $_SERVER['HTTP_USER_AGENT'] );
286
+ add_filter( 'site_transient_browser_' . $key, '__return_null' );
287
+ }
288
+ endif;
289
+ add_action( 'admin_init', 'c2c_no_browser_nag' );
290
+
291
+ break;
292
+
293
+ case 'it':
294
+
295
+ add_filter( 'site_transient_update_themes', array( __CLASS__, 'remove_theme_update_notification' ) );
296
+
297
+ // remove blocked themes from being checked for updates at wordpress.org
298
+ add_filter( 'http_request_args', array( __CLASS__, 'http_request_args_themes_filter' ), 5, 2 );
299
+
300
+ break;
301
+
302
+ // Disable automatic background updates.
303
+ case 'abup' :
304
+
305
+ wp_clear_scheduled_hook( 'wp_maybe_auto_update' );
306
+
307
+ break;
308
+
309
+ /*
310
+ Version Added: 4.4.0
311
+ Last Version Edited: 4.5.0
312
+ Description: Disables minor core updates in the Disable Updates Manager settings.
313
+ */
314
+ case 'minor-core-updates' :
315
+
316
+ //TO BE ADDED
317
+
318
+ break;
319
+
320
+ /*
321
+ Version Added: 4.4.0
322
+ Last Version Edited: 4.5.0
323
+ Description: Disables major core updates in the Disable Updates Manager settings.
324
+ */
325
+ case 'major-core-updates' :
326
+
327
+ //TO BE ADDED
328
+
329
+ break;
330
+
331
+ /*
332
+ Version Added: 4.4.0
333
+ Description: Disables auto translation updates in the Disable Updates Manager settings.
334
+ */
335
+ case 'auto-translation-updates' :
336
+
337
+ add_filter( 'auto_update_translation', '__return_false' );
338
+
339
+ break;
340
+
341
+ /*
342
+ Version Added: 4.4.0
343
+ Description: Disables auto core e-mails in the Disable Updates Manager settings.
344
+ */
345
+ case 'auto-core-emails' :
346
+
347
+ add_filter( 'auto_core_update_send_email', '__return_false' );
348
+
349
+ break;
350
+
351
+ }
352
+ }
353
+ }
354
+
355
+ static function update_plugin_block_status() {
356
+
357
+ if ( ! current_user_can( 'update_plugins' ) ) {
358
+ return;
359
+ }
360
+
361
+ // see if there are actions to process
362
+ if ( ! isset( $_GET[ 'disable_updates' ] ) || ! isset( $_GET[ '_wpnonce' ] ) ) {
363
+ return;
364
+ }
365
+
366
+ if ( ! wp_verify_nonce( $_GET[ '_wpnonce' ], 'disable_updates' ) ) {
367
+ return;
368
+ }
369
+
370
+ $blocked = get_option( 'disable_updates_blocked' );
371
+ // $plugins = get_site_transient( 'update_plugins' );
372
+
373
+ // block action
374
+ // if ( isset( $_GET[ 'block' ] ) && isset( $plugins->response ) && isset( $plugins->response[ $_GET[ 'block' ] ] ) ) {
375
+ // $p = $plugins->response[ $_GET[ 'block' ] ];
376
+ // $blocked[ $_GET[ 'block' ] ] = array( 'slug' => $p->slug, 'new_version' => $p->new_version );
377
+ // }
378
+ if ( isset( $_GET[ 'block' ] ) ) {
379
+
380
+ $blocked[ $_GET[ 'block' ] ] = TRUE;
381
+ }
382
+
383
+ if ( isset( $_GET[ 'unblock' ] ) ) {
384
+
385
+ unset( $blocked[ $_GET[ 'unblock' ] ] );
386
+ }
387
+
388
+ update_option( 'disable_updates_blocked', $blocked );
389
+ }
390
+
391
+ static function remove_plugin_update_notification( $plugins ) {
392
+
393
+ if ( ! isset( $plugins->response ) || count( $plugins->response ) == 0 ) {
394
+
395
+ return $plugins;
396
+ }
397
+
398
+ $blocked = (array) get_option( 'disable_updates_blocked' );
399
+
400
+ // foreach ( $blocked as $filename => $plugin ) {
401
+
402
+ // if ( isset( $plugins->response[ $filename ] )
403
+ // && $plugins->response[ $filename ]->new_version == $plugin[ 'new_version' ]
404
+ // ) {
405
+
406
+ // $plugins->disable_updates[ $filename ] = $plugins->response[ $filename ];
407
+ // unset( $plugins->response[ $filename ] );
408
+ // }
409
+ // }
410
+ foreach ( $blocked as $filename => $plugin ) {
411
+
412
+ if ( isset( $plugins->response[ $filename ] ) && $plugin == TRUE ) {
413
+
414
+ $plugins->disable_updates[ $filename ] = $plugins->response[ $filename ];
415
+ unset( $plugins->response[ $filename ] );
416
+ }
417
+ }
418
+
419
+ return $plugins;
420
+ }
421
+
422
+ static function remove_theme_update_notification( $themes ) {
423
+
424
+ $options = get_option( '_disable_updates' );
425
+
426
+ if ( FALSE === $options ) {
427
+
428
+ return $themes;
429
+ }
430
+
431
+ if ( isset( $options['themes'] ) ) {
432
+
433
+ $blocked = $options['themes'];
434
+
435
+ } else {
436
+
437
+ return $themes;
438
+ }
439
+
440
+ if ( 0 === (int) count( $blocked ) ) {
441
+
442
+ return $themes;
443
+ }
444
+
445
+ if ( ! isset( $themes->response ) || count( $themes->response ) == 0 ) {
446
+
447
+ return $themes;
448
+ }
449
+
450
+ foreach ( $blocked as $theme ) {
451
+
452
+ if ( isset( $themes->response[ $theme ] ) ) {
453
+
454
+ $themes->disable_updates[ $theme ] = $themes->response[ $theme ];
455
+ unset( $themes->response[ $theme ] );
456
+ }
457
+ }
458
+
459
+ return $themes;
460
+ }
461
+
462
+ static function last_checked() {
463
+ global $wp_version;
464
+
465
+ return (object) array(
466
+ 'last_checked' => time(),
467
+ 'updates' => array(),
468
+ 'version_checked' => $wp_version,
469
+ );
470
+ }
471
+
472
+ // Disable Core Updates
473
+ static function disable_core_updates() {
474
+
475
+ # 2.3 to 2.7:
476
+ add_action( 'init', create_function( '', 'remove_action( \'init\', \'wp_version_check\' );' ), 2 );
477
+ add_filter( 'pre_option_update_core', '__return_null' );
478
+
479
+ # 2.8 to 3.0:
480
+ remove_action( 'wp_version_check', 'wp_version_check' );
481
+ remove_action( 'admin_init', '_maybe_update_core' );
482
+ add_filter( 'pre_transient_update_core', array( __CLASS__,'last_checked' ) );
483
+
484
+ # >3.0:
485
+ remove_action( 'load-update-core.php', 'wp_update_core' );
486
+ add_filter( 'pre_site_transient_update_core', array( __CLASS__,'last_checked' ) );
487
+
488
+ // Hide Update Notices in Admin Dashboard
489
+ add_action( 'admin_menu', create_function( '', 'remove_action( \'admin_notices\', \'update_nag\', 3 );' ) );
490
+
491
+ wp_clear_scheduled_hook( 'wp_version_check' );
492
+
493
+ // Disable email.
494
+ add_filter( 'auto_core_update_send_email', '__return_false' );
495
+
496
+ // This doesn't make sense. Purpose?
497
+ // apply_filters( 'automatic_core_updates_send_debug_email', TRUE, $type, $core_update, $result );
498
+ }
499
+
500
+ // Disable Plugin Updates
501
+ static function disable_plugin_updates() {
502
+
503
+ # 2.3 to 2.7:
504
+ // add_action( 'admin_menu', create_function( '$a', "remove_action( 'load-plugins.php', 'wp_update_plugins' );") );
505
+ // add_action( 'admin_init', create_function( '$a', "remove_action( 'admin_init', 'wp_update_plugins' );"), 2 );
506
+ // add_action( 'init', create_function( '$a', "remove_action( 'init', 'wp_update_plugins' );"), 2 );
507
+ add_filter( 'pre_option_update_plugins', '__return_null' );
508
+
509
+ # 2.8 to 3.0:
510
+ remove_action( 'load-plugins.php', 'wp_update_plugins' );
511
+ remove_action( 'load-update.php', 'wp_update_plugins' );
512
+ remove_action( 'admin_init', '_maybe_update_plugins' );
513
+ remove_action( 'wp_update_plugins', 'wp_update_plugins' );
514
+ add_filter( 'pre_transient_update_plugins', array( __CLASS__,'last_checked' ) );
515
+
516
+ # >3.0:
517
+ remove_action( 'load-update-core.php', 'wp_update_plugins' );
518
+ add_filter( 'pre_site_transient_update_plugins', array( __CLASS__,'last_checked' ) );
519
+
520
+ wp_clear_scheduled_hook( 'wp_update_plugins' );
521
+
522
+ // Disable Plugin Update E-mails (only works for some plugins)
523
+ // This doesn't make sense. Purpose?
524
+ // apply_filters( 'auto_plugin_update_send_email', FALSE, $type, $plugin_update, $result );
525
+
526
+ // This doesn't make sense. Purpose?
527
+ // apply_filters( 'automatic_plugin_updates_send_debug_email', TRUE, $type, $plugin_update, $result );
528
+ }
529
+
530
+ // Disable Theme Updates
531
+ static function disable_theme_updates() {
532
+
533
+ # 2.8 to 3.0:
534
+ remove_action( 'load-themes.php', 'wp_update_themes' );
535
+ remove_action( 'load-update.php', 'wp_update_themes' );
536
+ remove_action( 'admin_init', '_maybe_update_themes' );
537
+ remove_action( 'wp_update_themes', 'wp_update_themes' );
538
+ add_filter( 'pre_transient_update_themes', array( __CLASS__,'last_checked' ) );
539
+
540
+ # >3.0:
541
+ remove_action( 'load-update-core.php', 'wp_update_themes' );
542
+ add_filter( 'pre_site_transient_update_themes', array( __CLASS__,'last_checked' ) );
543
+
544
+ wp_clear_scheduled_hook( 'wp_update_themes' );
545
+
546
+ // Disable Theme Update E-mails (only works for some plugins)
547
+ // This doesn't make sense. Purpose?
548
+ // apply_filters( 'auto_theme_update_send_email', FALSE, $type, $theme_update, $result );
549
+
550
+ // This doesn't make sense. Purpose?
551
+ // apply_filters( 'automatic_theme_updates_send_debug_email', TRUE, $type, $theme_update, $result );
552
+ }
553
+
554
+ static function plugin_block_action_link( $actions, $plugin_file, $plugin_data, $context ) {
555
+
556
+ $blocked = get_option( 'disable_updates_blocked' );
557
+
558
+ if ( $blocked !== FALSE && array_key_exists( $plugin_file, $blocked ) ) {
559
+
560
+ $actions[] = '<a class="delete" href="plugins.php?_wpnonce=' . wp_create_nonce( 'disable_updates' ) . '&disable_updates&unblock=' . $plugin_file . '"><small>Updates Blocked</a>';
561
+
562
+ } else {
563
+
564
+ $actions[] = '<a class="delete" href="plugins.php?_wpnonce=' . wp_create_nonce( 'disable_updates' ) . '&disable_updates&block=' . $plugin_file . '"><small>Updates Allowed</small></a>';
565
+ }
566
+
567
+ return $actions;
568
+ }
569
+
570
+ static function http_request_args_plugins_filter( $r, $url ) {
571
+
572
+ if ( 0 !== strpos( $url, 'https://api.wordpress.org/plugins/update-check/1.1/' ) ) {
573
+
574
+ return $r;
575
+ }
576
+
577
+ $blocked = get_option( 'disable_updates_blocked' );
578
+ $blocked = (array) array_keys( $blocked );
579
+
580
+ if ( 0 === (int) count( $blocked ) ) {
581
+
582
+ return $r;
583
+ }
584
+
585
+ if ( ! isset( $r['body']['plugins'] ) ) {
586
+
587
+ return $r;
588
+ }
589
+
590
+ $plugins = json_decode( $r['body']['plugins'], TRUE );
591
+
592
+ foreach ( $blocked as $p ) {
593
+
594
+ if ( isset( $plugins['plugins'][ $p ] ) ) unset( $plugins['plugins'][ $p ] );
595
+ if ( FALSE !== $key = array_search( $p, $plugins['active'] ) ) unset( $plugins['active'][ $key ] );
596
+ }
597
+
598
+ $r['body']['plugins'] = json_encode( $plugins );
599
+
600
+ return $r;
601
+ }
602
+
603
+ static function http_request_args_themes_filter( $r, $url ) {
604
+
605
+ if ( 0 !== strpos( $url, 'https://api.wordpress.org/themes/update-check/1.1/' ) ) {
606
+
607
+ return $r;
608
+ }
609
+
610
+ $options = get_option( '_disable_updates' );
611
+
612
+ if ( FALSE === $options ) {
613
+
614
+ return $r;
615
+ }
616
+
617
+ if ( isset( $options['themes'] ) ) {
618
+
619
+ $blocked = $options['themes'];
620
+
621
+ } else {
622
+
623
+ return $r;
624
+ }
625
+
626
+ if ( 0 === (int) count( $blocked ) ) {
627
+
628
+ return $r;
629
+ }
630
+
631
+ if ( ! isset( $r['body']['themes'] ) ) {
632
+
633
+ return $r;
634
+ }
635
+
636
+ $themes = json_decode( $r['body']['themes'], TRUE );
637
+
638
+ foreach ( $blocked as $t ) {
639
+
640
+ if ( isset( $themes['themes'][ $t ] ) ) unset( $themes['themes'][ $t ] );
641
+ }
642
+
643
+ $r['body']['themes'] = json_encode( $themes );
644
+
645
+ return $r;
646
+ }
647
+
648
+ // Help Tab
649
+ static function help_tab() {
650
+ global $test_help_page;
651
+
652
+ $screen = get_current_screen();
653
+ $content1 = <<<CONTENT1
654
+ <p>
655
+ This is the Disable Updates Manager settings help tab. In here you will find helpful information on what Disable Updates Manager does and how to use it.
656
+ </p>
657
+
658
+ <div class="error" id="error">
659
+ <p><strong>Please Note! - </strong>If either your WordPress core, theme, or plugins get too out
660
+ of date, you may run into compatibility problems. Check the capability tab for more information.</p>
661
+ </div>
662
+
663
+ CONTENT1;
664
+
665
+ $content2 = <<<CONTENT2
666
+ <div><br></div>
667
+ <div id="acolumn1">
668
+ <iframe width="310" height="174" src="//www.youtube.com/embed/VYEQg-hZd58?rel=0" frameborder="0" allowfullscreen></iframe>
669
+ <iframe width="310" height="174" src="//www.youtube.com/embed/Kd4s3EOcUtw?rel=0" frameborder="0" allowfullscreen></iframe>
670
+ </div>
671
+
672
+ <div id="acolumn2">
673
+ <iframe width="310" height="174" src="//www.youtube.com/embed/1R-be48AvrE?rel=0" frameborder="0" allowfullscreen></iframe>
674
+ <iframe width="310" height="174" src="//www.youtube.com/embed/mYznDVsbVBk?rel=0" frameborder="0" allowfullscreen></iframe>
675
+ </div>
676
+
677
+ CONTENT2;
678
+
679
+ $content3 = <<<CONTENT3
680
+ <p>
681
+ <a href="http://mpswp.wordpress.com" class="button">Our Website</a>
682
+ <a href="http://wordpress.org/support/plugin/stops-core-theme-and-plugin-updates" class="button">Support on WordPress</a>
683
+ <a href="https://github.com/Websiteguy/disable-updates-manager" class="button">GitHub Repository</a>
684
+ </p>
685
+
686
+ CONTENT3;
687
+
688
+ $content4 = <<<CONTENT4
689
+ <p>
690
+ Use the following features to customize the settings page as to suit your work-flow.
691
+ <br>
692
+ <br>
693
+ <strong>Screen Options</strong> - Use the Screen Options tab to choose which metaboxes you would like to display.
694
+ <br>
695
+ <br>
696
+ <strong>Drag and Drop</strong> - To rearrange the boxes, drag and drop by clicking on the title bar of the selected metabox and releasing when you see a gray dotted-line appear in the location you want to place the box.
697
+ <br>
698
+ <br>
699
+ <strong>Box Controls</strong> - Click the title bar of the box to expand or collapse the contents.
700
+ <br>
701
+ <br>
702
+ <strong>Chosen</strong> - Check the Disable Themes Individually setting and/or the Disable Plugins Individually settings to enable the chosen multiply select box.
703
+ <br>
704
+ <br>
705
+ <strong>Tooltips</strong> - If you are having trouble figuring out how a setting works, just wave over the "?". It will display a little bubble with helpful information.
706
+ </p>
707
+
708
+ CONTENT4;
709
+
710
+ $content5 = <<<CONTENT5
711
+
712
+ <p style="align: center;">
713
+ <h3>Contributors:</h3>
714
+ <ul>
715
+ <li><a href="http://profiles.wordpress.org/kidsguide/">Matthew</a></li>
716
+ <li><a href="http://profiles.wordpress.org/mps-plugins/">MPS Plugins</a></li>
717
+ <li><a href="http://profiles.wordpress.org/shazahm1hotmailcom/">Shazahm1</a></li>
718
+ <li><a href="http://profiles.wordpress.org/szepeviktor/">szepe.viktor</a></li>
719
+ </ul>
720
+ </p>
721
+
722
+ CONTENT5;
723
+
724
+ $content6 = <<<CONTENT6
725
+ <p>
726
+ WordPress encourages you to update your plugins, themes, and core to make sure that there are no bugs. Even though you most likely want to disable all the updates and never think about updating again, you should still consider updating every once in a while to avoid major bugs and errors on your WordPress website.
727
+
728
+ <h3>This plugin is tested so there are no problems.</h3>
729
+ <ul>
730
+ <li>Tested with WordPress 4.0.1 and 4.1beta1.</li>
731
+ <li>Tested with popular plugins to ensure that there are no conflicts.</li>
732
+ <li>Tested with popular themes to ensure that there are no conflicts.</li>
733
+ </ul>
734
+ </p>
735
+
736
+ CONTENT6;
737
+
738
+ // Add my_help_tab if current screen is My Admin Page
739
+ $screen->add_help_tab(array(
740
+ 'id' => 'help_tab_content_1',
741
+ 'title' => __('Overview'),
742
+ 'content' => $content1,
743
+ ));
744
+
745
+ $screen->add_help_tab(array(
746
+ 'id' => 'help_tab_content_4',
747
+ 'title' => __('Layout'),
748
+ 'content' => $content4,
749
+ ));
750
+
751
+ $screen->add_help_tab(array(
752
+ 'id' => 'help_tab_content_2',
753
+ 'title' => __('Tutorials'),
754
+ 'content' => $content2,
755
+ ));
756
+
757
+ $screen->add_help_tab(array(
758
+ 'id' => 'help_tab_content_6',
759
+ 'title' => __('Capability'),
760
+ 'content' => $content6,
761
+ ));
762
+
763
+ $screen->add_help_tab(array(
764
+ 'id' => 'help_tab_content_3',
765
+ 'title' => __('Troubleshooting'),
766
+ 'content' => $content3,
767
+ ));
768
+
769
+ $screen->set_help_sidebar($content5);
770
+
771
+ }
772
+
773
+ static function metabox_global( $status ) {
774
+
775
+ ?>
776
+ <div>
777
+ <p>
778
+ <div class="showonhover">
779
+ <label for="all_notify">
780
+ <input
781
+ type="checkbox" <?php checked( 1, ( isset( $status['all'] ) ? (int) $status['all'] : 0 ), TRUE ); ?>
782
+ value="1" id="all_notify"
783
+ name="_disable_updates[all]"> <?php _e( 'Disable All Updates', 'disable-updates-manager' ) ?>
784
+ </label>
785
+ <span>
786
+ <a href="#" class="viewdescription">?</a>
787
+ <span class="hovertext">Disables core, theme, and plugin updates.</span>
788
+ </span>
789
+ </div>
790
+ </p>
791
+ </div>
792
+
793
+ <div style="padding-left: 12px;">
794
+ <p>
795
+ <div>
796
+ <label for="plugins_notify">
797
+ <input type="checkbox" <?php checked( 1, ( isset( $status['plugin'] ) && ! isset( $status['all'] ) ? (int) $status['plugin'] : 0 ), TRUE ); ?>
798
+ value="1" id="plugins_notify"
799
+ name="_disable_updates[plugin]"
800
+ <?php disabled( 1, ( isset( $status['all'] ) ? (int) $status['all'] : 0 ) ) ?>> <?php _e( 'Disable All Plugin Updates', 'disable-updates-manager' ) ?>
801
+ </label>
802
+ </div>
803
+ <br>
804
+ <div>
805
+ <label for="themes_notify">
806
+ <input type="checkbox" <?php checked( 1, ( isset( $status['theme'] ) && ! isset( $status['all'] ) ? (int) $status['theme'] : 0 ), TRUE ); ?>
807
+ value="1" id="themes_notify"
808
+ name="_disable_updates[theme]"
809
+ <?php disabled( 1, ( isset( $status['all'] ) ? (int) $status['all'] : 0 ) ) ?>> <?php _e( 'Disable All Theme Updates', 'disable-updates-manager' ) ?>
810
+ </label>
811
+ </div>
812
+ <br>
813
+ <div>
814
+ <label for="core_notify">
815
+ <input type="checkbox" <?php checked( 1, ( isset( $status['core'] ) && ! isset( $status['all'] ) ? (int) $status['core'] : 0 ), TRUE ); ?>
816
+ value="1" id="core_notify"
817
+ name="_disable_updates[core]"
818
+ <?php disabled( 1, ( isset( $status['all'] ) ? (int) $status['all'] : 0 ) ) ?>> <?php _e( 'Disable All WordPress Core Update', 'disable-updates-manager' ) ?>
819
+ </label>
820
+ </div>
821
+ <div style="padding-left:20px;">
822
+ <br>
823
+ <small>Disable major and minor core feature coming soon...<small>
824
+ </p>
825
+ </div>
826
+ </div>
827
+
828
+ <?php
829
+ }
830
+
831
+ static function metabox_other( $status ) {
832
+
833
+ ?>
834
+ <div>
835
+ <p>
836
+ <div class="showonhover">
837
+ <label for="page_notify">
838
+ <input
839
+ type="checkbox" <?php checked( 1, ( isset( $status['page'] ) ? (int) $status['page'] : 0 ), TRUE ); ?>
840
+ value="1" id="page_notify"
841
+ name="_disable_updates[page]"> <?php _e( 'Remove the Updates Page', 'disable-updates-manager' ) ?>
842
+ </label>
843
+ <span>
844
+ <a href="#" class="viewdescription">?</a></a>
845
+ <span class="hovertext">The page under the Dashboard tab.</span>
846
+ </span>
847
+ </div>
848
+ <br>
849
+ <div class="showonhover">
850
+ <label for="bnag_notify">
851
+ <input type="checkbox" <?php checked( 1, ( isset( $status['bnag'] ) ? (int) $status['bnag'] : 0 ), TRUE ); ?>
852
+ value="1" id="bnag_notify"
853
+ name="_disable_updates[bnag]"> <?php _e( 'Disable Out of Date Browser Nag', 'disable-updates-manager' ) ?>
854
+ </label>
855
+ <span>
856
+ <a href="#" class="viewdescription">?</a>
857
+ <span class="hovertext">Removes the browsers is out of date notification in you WordPress dashboard.</span>
858
+ </span>
859
+ </div>
860
+ <br>
861
+ <div class="showonhover">
862
+ <label for="wpv_notify">
863
+ <input
864
+ type="checkbox" <?php checked( 1, ( isset( $status['wpv'] ) ? (int) $status['wpv'] : 0 ), TRUE ); ?>
865
+ value="1" id="wpv_notify"
866
+ name="_disable_updates[wpv]"> <?php _e( 'Disable WordPress Core Version from Footer', 'disable-updates-manager' ) ?>
867
+ </label>
868
+ <span>
869
+ <a href="#" class="viewdescription">?</a>
870
+ <span class="hovertext">Removes it for all users.</span>
871
+ </span>
872
+ </div>
873
+ <br>
874
+ <div class="showonhover">
875
+ <label for="auto-translation-updates_notify">
876
+ <input type="checkbox" <?php checked( 1, ( isset( $status['auto-translation-updates'] ) ? (int) $status['auto-translation-updates'] : 0 ), TRUE ); ?>
877
+ value="1" id="auto-translation-updates_notify"
878
+ name="_disable_updates[auto-translation-updates]"> <?php _e( 'Disable Automatic Translation Updates', 'disable-updates-manager' ) ?>
879
+ </label>
880
+ <span>
881
+ <a href="#" class="viewdescription">?</a>
882
+ <span class="hovertext">Disables the automatic translation updates for you.</span>
883
+ </span>
884
+ </div>
885
+ <br>
886
+ <div class="showonhover">
887
+ <label for="auto-core-emails_notify">
888
+ <input
889
+ type="checkbox" <?php checked( 1, ( isset( $status['auto-core-emails'] ) ? (int) $status['auto-core-emails'] : 0 ), TRUE ); ?>
890
+ value="1" id="auto-core-emails_notify"
891
+ name="_disable_updates[auto-core-emails]"> <?php _e( 'Disable Core Update E-mails', 'disable-updates-manager' ) ?>
892
+ </label>
893
+ <span>
894
+ <a href="#" class="viewdescription">?</a>
895
+ <span class="hovertext">Disables the core update e-mails so that they will not be sent to you.</span>
896
+ </span>
897
+ </div>
898
+ <br>
899
+ <div>
900
+ <label for="abup_notify">
901
+ <input type="checkbox" <?php checked( 1, ( isset( $status['abup'] ) ? (int) $status['abup'] : 0 ), TRUE ); ?>
902
+ value="1" id="abup_notify"
903
+ name="_disable_updates[abup]"> <?php _e( 'Disable Automatic Background Updates', 'disable-updates-manager' ) ?>
904
+ </label>
905
+ </p>
906
+ </div>
907
+ </div>
908
+
909
+ <?php
910
+ }
911
+
912
+ static function metabox_themes( $status ) {
913
+
914
+ ?>
915
+ <div>
916
+ <p>
917
+ <div class="showonhover">
918
+ <label for="dum-disable-themes">
919
+ <input type="checkbox" <?php checked( 1, ( isset( $status['it'] ) && ! isset( $status['all'] ) ? (int) $status['it'] : 0 ), TRUE ); ?>
920
+ id="dum-disable-themes"
921
+ value="1"
922
+ name="_disable_updates[it]"
923
+ <?php disabled( 1, ( isset( $status['all'] ) ? (int) $status['all'] : 0 ) ) ?>> <?php _e( 'Disable Themes Individually', 'disable-updates-manager' ) ?>
924
+ </label>
925
+ <span>
926
+ <a href="#" class="viewdescription">?</a>
927
+ <span class="hovertext">Enabling this option will show the list of themes to disable updates.</span>
928
+ </span>
929
+ </p>
930
+ </div>
931
+ </div>
932
+ <?php
933
+
934
+ $themes = wp_get_themes( array( 'allowed' => TRUE ) );
935
+
936
+ if ( ! empty( $themes ) ) {
937
+
938
+ echo '<select class="dum-enhanced-select" id="dum-disable-themes-select" name="_disable_updates[themes][]" data-placeholder="' . __( 'Select theme(s) to disable...', 'disable-updates-manager' ) . '" multiple' . ( isset( $status['it'] ) && ! isset( $status['all'] ) ? '' : ' disabled' ) . '>';
939
+
940
+ echo '<option value=""></option>';
941
+
942
+ foreach ( $themes as $slug => $theme ) {
943
+
944
+ printf( '<option value="%1$s"%2$s>%3$s</option>',
945
+ esc_attr( $slug ),
946
+ ! isset( $status['all'] ) && isset( $status['it'] ) && isset( $status['themes'] ) && in_array( $slug, $status['themes'] ) ? ' SELECTED' : '',
947
+ esc_html( $theme->name )
948
+ );
949
+ }
950
+
951
+ echo '</select>';
952
+ }
953
+
954
+ }
955
+
956
+ static function metabox_plugins( $status ) {
957
+
958
+ ?>
959
+ <p>
960
+ <div class="showonhover">
961
+ <label for="dum-disable-plugins">
962
+ <input type="checkbox" <?php checked( 1, ( isset( $status['ip'] ) && ! isset( $status['all'] ) ? (int) $status['ip'] : 0 ), TRUE ); ?>
963
+ id="dum-disable-plugins"
964
+ value="1"
965
+ name="_disable_updates[ip]"
966
+ <?php disabled( 1, ( isset( $status['all'] ) ? (int) $status['all'] : 0 ) ) ?>> <?php _e( 'Disable Plugins Individually', 'disable-updates-manager' ) ?>
967
+ </label>
968
+ <span>
969
+ <a href="#" class="viewdescription">?</a>
970
+ <span class="hovertext">Enabling this option will show the list of plugins to disable updates.</span>
971
+ </span>
972
+ </p>
973
+ </div>
974
+
975
+ <?php
976
+
977
+ $plugins = get_plugins();
978
+ $blocked = get_option( 'disable_updates_blocked' );
979
+
980
+ if ( ! empty( $plugins ) ) {
981
+
982
+ echo '<select class="dum-enhanced-select" id="dum-disable-plugins-select" name="_disable_updates[plugins][]" data-placeholder="' . __( 'Select plugin(s) to disable...', 'disable-updates-manager' ) . '" multiple' . ( isset( $status['ip'] ) && ! isset( $status['all'] ) ? '' : ' disabled' ) . '>';
983
+
984
+ echo '<option value=""></option>';
985
+
986
+ foreach ( $plugins as $slug => $plugin ) {
987
+
988
+ printf( '<option value="%1$s"%2$s>%3$s</option>',
989
+ esc_attr( $slug ),
990
+ ! isset( $status['all'] ) && isset( $status['ip'] ) && array_key_exists( $slug, (array) $blocked ) ? ' SELECTED' : '',
991
+ esc_attr( $plugin['Name'] )
992
+ );
993
+ }
994
+
995
+ echo '</select>';
996
+ }
997
+
998
+ }
999
+
1000
+ // Settings page (under dashboard).
1001
+ static function display_page() {
1002
+ ?>
1003
+
1004
+ <h2><?php _e( 'Disable Updates Manager', 'disable-updates-manager' ); ?></h2>
1005
+
1006
+ <?php
1007
+
1008
+ if ( !current_user_can('manage_options') ) {
1009
+ wp_die('You do not have sufficient permissions to access this page.');
1010
+ }
1011
+
1012
+ if ( current_user_can('manage_options') ) {
1013
+
1014
+ $status = get_option( '_disable_updates' );
1015
+
1016
+ ?>
1017
+
1018
+ <div class="dashboard-widgets-wrap">
1019
+
1020
+ <div id="dashboard-widgets" class="metabox-holder columns-<?php echo 1 == get_current_screen()->get_columns() ? '1' : '2'; ?>">
1021
+
1022
+ <form name="dum-options" method="post" action="options.php">
1023
+ <input type="hidden" name="action" value="dum-update-options">
1024
+ <?php wp_nonce_field( 'dum-update-options-nonce' );
1025
+
1026
+ /* Used to save closed metaboxes and their order */
1027
+ wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', FALSE );
1028
+ wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', FALSE ); ?>
1029
+
1030
+ <div class="postbox-container">
1031
+ <?php do_meta_boxes( self::$page_hook, 'left', $status ); ?>
1032
+ </div>
1033
+
1034
+ <div class="postbox-container">
1035
+ <?php do_meta_boxes( self::$page_hook, 'right', $status ); ?>
1036
+ <?php //do_meta_boxes( self::$page_hook, 'advanced', $status ); ?>
1037
+ </div>
1038
+
1039
+ <?php settings_fields( '_disable_updates' ); ?>
1040
+
1041
+ <p class="submit clear">
1042
+ <input type="submit" class="button-primary" value="<?php _e( 'Update Settings' ) ?>"/>
1043
+ <a href="https://wordpress.org/support/view/plugin-reviews/stops-core-theme-and-plugin-updates?#postform" style="background-color:#ffff7f" class="button">Rate Plugin</a>
1044
+ <a href="http://sparrowkids2.polldaddy.com/s/disable-updates-manager-feedbeck" class="button">Feedback Survey</a>
1045
+ </p>
1046
+
1047
+ </form>
1048
+
1049
+ </div><!-- #dashboard-widgets -->
1050
+
1051
+ </div><!-- .dashboard-widgets-wrap -->
1052
+
1053
+ <?php
1054
+ }
1055
+ }
1056
+
1057
+ }
1058
+
1059
+ global $Disable_Updates;
1060
+ $Disable_Updates = new Disable_Updates();
1061
+
1062
+ if ( ! function_exists( 'printr' ) ) {
1063
+ function printr( $txt ) {
1064
+ echo '<pre>';
1065
+ print_r( $txt );
1066
+ echo '</pre>';
1067
+ }
1068
  }
readme.txt CHANGED
@@ -2,61 +2,37 @@
2
  Contributors: MPS Plugins, kidsguide, shazahm1@hotmail.com, szepe.viktor
3
  Tags: Disable All Updates, Disable Plugin Updates, Disable Theme Updates, Disable WordPress Core Updates, Disable Core Updates, Disable Updates Settings, Disable Updates, Disable All WordPress Updates, Disable All WordPress Updates Settings, Disable Updates Manager, Disable All Updates Manager, Disable Updates Manager Settings, Update Check, No Browser Nag, MPS Plugins, Manager, Disable, Updates
4
  Requires at least: 3.0
5
- Tested up to: 4.0
6
  Stable tag: trunk
7
 
8
  A configurable plugin that disables updates for you. Easy, clean and helpful + Great Support.
9
 
10
  == Description ==
11
- The best plugin to disable updates is here!
12
-
13
- Please rate this plugin and feel free to give feedback
14
-
15
- This plugin is configurable! Check the updates you would like to disable in the settings page along with other helpful settings. The settings page is located under the settings section in your dashboard (changed in version 4.0). Check the features below or the <a href="http://wordpress.org/plugins/stops-core-theme-and-plugin-updates/screenshots/">screenshots</a> for more information.
16
 
17
  = Features Include =
18
  <ol>
19
  <li>Disables plugins and themes individually.</li>
20
- <li>Disables plugin updates.</li>
21
- <li>Disables theme updates.</li>
22
- <li>Disable WordPress core updates.</li>
23
  <li>And lots of other settings.</li>
24
  </ol>
25
 
26
- To see more features view the <a href="http://wordpress.org/plugins/stops-core-theme-and-plugin-updates/screenshots/">screenshots</a> or the video tutorials below.
27
-
28
  = Blog =
 
29
 
30
- <a href="http://www.mpswp.wordpress.com">Check our blog for beta releases, updates, and other information</a>. You can also check out our <a target="_blank" href="https://github.com/Websiteguy/disable-updates-manager">GitHub Repository</a>.
31
-
32
- = Video Tutorials =
33
- [youtube https://www.youtube.com/watch?v=gm03k-Oxt38]
34
-
35
- [youtube https://www.youtube.com/watch?v=9vPVis3NZHI]
36
-
37
- == Frequently Asked Questions ==
38
- = Q: How is this plugin different from the other disable updates plugins? =
39
- A: Their are a couple of differences.
40
  <ol>
41
- <li>They do not disable WordPress automatic updates.</li>
42
- <li>They do not have video tutorials and screenshots.</li>
43
- <li>They do not have settings to make it configurable.</li>
44
- <li>They do not disable plugins and themes individually.</li>
45
  </ol>
46
 
47
- = Q: How does this plugin work? I can't figure it out for the life of me. =
48
- A: This video tutorial may help a little.
49
-
50
- [youtube https://www.youtube.com/watch?v=9vPVis3NZHI]
51
-
52
- = Q: Does this plugins disable WP automatic updates too? Since 3.8, WP update their version automatically which could be a problem too. =
53
- A: Yes, this plugin will disable the automatic updates too.
54
-
55
- = Q: If I remove this plugin from my website will I be able to update my plugins, themes, and WordPress core again? =
56
- A: Yes, this plugin just disables the update. We has also recently made an uninstall.php for this plugin.
57
-
58
- = Q: Does this plugin still work? People have said that it is broken. =
59
- A: As far as I know, this is just some spam. I have not received any complaints about it and there are lots of 5 star ratings for the most recent versions. You can help by ratings the plugin and saying if it is broken or not.
60
 
61
  == Screenshots ==
62
  1. Disable Updates Globally
@@ -67,7 +43,7 @@ A: As far as I know, this is just some spam. I have not received any complaints
67
  6. Help Tab
68
 
69
  == Installation ==
70
- Installing Disable Updates Manager.
71
 
72
  1. Install Disable Updates Manager either via the WordPress.org plugin page and uploading the files to your FTP manually, or going to the and new plugins section in your dashboard.
73
 
@@ -76,6 +52,58 @@ Installing Disable Updates Manager.
76
  3. Click on the configure button next to the plugin or go to the plugin settings page under the settings section in your dashboard.
77
 
78
  == Changelog ==
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
79
  = 4.3.13 =
80
  * Fixed contributor issue.
81
  * Updated description in readme.txt.
2
  Contributors: MPS Plugins, kidsguide, shazahm1@hotmail.com, szepe.viktor
3
  Tags: Disable All Updates, Disable Plugin Updates, Disable Theme Updates, Disable WordPress Core Updates, Disable Core Updates, Disable Updates Settings, Disable Updates, Disable All WordPress Updates, Disable All WordPress Updates Settings, Disable Updates Manager, Disable All Updates Manager, Disable Updates Manager Settings, Update Check, No Browser Nag, MPS Plugins, Manager, Disable, Updates
4
  Requires at least: 3.0
5
+ Tested up to: 4.0.1 and 4.1beta1
6
  Stable tag: trunk
7
 
8
  A configurable plugin that disables updates for you. Easy, clean and helpful + Great Support.
9
 
10
  == Description ==
11
+ This plugin is configurable! Check the type of update(s) you would like to disable in the settings page along with other helpful settings. Watch the video tutorial below for more information.
 
 
 
 
12
 
13
  = Features Include =
14
  <ol>
15
  <li>Disables plugins and themes individually.</li>
16
+ <li>Disables WordPress core updates.</li>
17
+ <li>Disable automatic background updates.</li>
 
18
  <li>And lots of other settings.</li>
19
  </ol>
20
 
 
 
21
  = Blog =
22
+ <a href="http://www.mpswp.wordpress.com">Check our blog for more information about Disable Updates Manager</a>.
23
 
24
+ = There are several ways you can get involved to help make Disable Updates Manager better =
 
 
 
 
 
 
 
 
 
25
  <ol>
26
+ <li>Report Bugs: If you find a bug, error or other problem, please report it on <a href="https://github.com/Websiteguy/disable-updates-manager/issues/new">GitHub</a> or in the <a href="https://wordpress.org/support/plugin/stops-core-theme-and-plugin-updates">WordPress Support Forum</a>!</li>
27
+ <li>Suggest New Features: Have an awesome new feature that you would like to be added? Please share it on <a href="https://github.com/Websiteguy/disable-updates-manager/issues/new">GitHub</a> or the <a href="https://wordpress.org/support/plugin/stops-core-theme-and-plugin-updates">WordPress Support Forum</a>!</li>
28
+ <li>Issue Pull Requests: The easiest way to get involved is to help out on issues already reported in <a href="https://github.com/Websiteguy/disable-updates-manager/compare">GitHub</a> or the <a href="https://wordpress.org/support/plugin/stops-core-theme-and-plugin-updates">WordPress Support Forum</a>.</li>
 
29
  </ol>
30
 
31
+ = Video Tutorials =
32
+ [youtube https://www.youtube.com/watch?v=VYEQg-hZd58]
33
+ [youtube https://www.youtube.com/watch?v=mYznDVsbVBk]
34
+ [youtube https://www.youtube.com/watch?v=1R-be48AvrE]
35
+ [youtube https://www.youtube.com/watch?v=Kd4s3EOcUtw]
 
 
 
 
 
 
 
 
36
 
37
  == Screenshots ==
38
  1. Disable Updates Globally
43
  6. Help Tab
44
 
45
  == Installation ==
46
+ <strong>Installing Disable Updates Manager</strong>
47
 
48
  1. Install Disable Updates Manager either via the WordPress.org plugin page and uploading the files to your FTP manually, or going to the and new plugins section in your dashboard.
49
 
52
  3. Click on the configure button next to the plugin or go to the plugin settings page under the settings section in your dashboard.
53
 
54
  == Changelog ==
55
+ = 4.6.0 =
56
+ * Removed unknown character to fix debug error.
57
+ * Updated screenshots.
58
+ * Works with WordPress 4.0.1 and 4.1beta1.
59
+ * Fixed error that didn't remove rate notice in help tab.
60
+ * Updated some help tab content.
61
+
62
+ = 4.5.0* =
63
+ * Added rate plugin button.
64
+ * Added Feedback survey button.
65
+ * Removed rate plugin notice in help tab.
66
+ * Edited disable plugins individually text display on plugin page when activated.
67
+ * Removed disable major and minor core feature. It wasn't working but we hope to get it back there in a later version of Disable Updates Manager.
68
+ * Edited plugin description a little.
69
+ * Edited help tab information.
70
+ * Updated screenshots.
71
+ * Removed FAQ link on plugin page.
72
+
73
+ = 4.4.1.2* =
74
+ * Attempt 3 at fixing the major and minor core updates setting.
75
+
76
+ = 4.4.1.1* =
77
+ * Attempt 2 at fixing the major and minor core updates setting.
78
+ * Renamed function.php to main.php.
79
+ * Removed random image in repository.
80
+
81
+ = 4.4.1* =
82
+ * Fixed disable major and minor settings.
83
+
84
+ = 4.4.0.1* =
85
+ * Fixed video tutorial typo.
86
+ * Fixed readme.txt typo.
87
+
88
+ = 4.4.0* =
89
+ * Removed title /* */ from chosen.min.css to make it more compressed.
90
+ * Added disable auto translation updates setting.
91
+ * Added disable auto core update e-mails setting.
92
+ * Added disable minor core updates setting.
93
+ * Added disable major core updates setting.
94
+ * Added better GitHub links to readme.txt.
95
+ * Removed FAQ in readme.txt.
96
+ * Edited description in readme.txt.
97
+ * Fixed typo in the Disable Plugins Individually setting.
98
+ * Fixed typo in the Disable Themes Individually setting.
99
+ * Added Settings Layout video tutorial.
100
+ * Added Disable Update Types video tutorial.
101
+ * Added Disable Plugins and Themes Individually video tutorial.
102
+ * Added Other Settings video tutorial.
103
+ * Removed old tutorials.
104
+ * Edited contributor section in the settings help tab.
105
+ * Few minor note changes in files.
106
+
107
  = 4.3.13 =
108
  * Fixed contributor issue.
109
  * Updated description in readme.txt.
vendor/chosen/chosen.min.css CHANGED
@@ -1,14 +1,4 @@
1
- /*!
2
- Chosen, a Select Box Enhancer for jQuery and Prototype
3
- by Patrick Filler for Harvest, http://getharvest.com
4
-
5
- Version 1.1.0
6
- Full source at https://github.com/harvesthq/chosen
7
- Copyright (c) 2011 Harvest http://getharvest.com
8
-
9
- MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
10
- This file is generated by `grunt build`, do not edit it by hand.
11
- */.chosen-container{position:relative;display:inline-block;vertical-align:middle;font-size:13px;zoom:1;*display:inline;-webkit-user-select:none;-moz-user-select:none;user-select:none}
12
  .chosen-container .chosen-drop{position:absolute;top:100%;left:-9999px;z-index:1010;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;width:100%;border:1px solid #aaa;border-top:0;background:#fff;box-shadow:0 4px 5px rgba(0,0,0,0.15)}
13
  .chosen-container.chosen-with-drop .chosen-drop{left:0}.chosen-container a{cursor:pointer}.chosen-container-single .chosen-single{position:relative;display:block;overflow:hidden;padding:0 0 0 8px;height:23px;border:1px solid #aaa;border-radius:5px;background-color:#fff;background:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#fff),color-stop(50%,#f6f6f6),color-stop(52%,#eee),color-stop(100%,#f4f4f4));background:-webkit-linear-gradient(top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background:-moz-linear-gradient(top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background:-o-linear-gradient(top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background:linear-gradient(top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background-clip:padding-box;box-shadow:0 0 3px white inset,0 1px 1px rgba(0,0,0,0.1);color:#444;text-decoration:none;white-space:nowrap;line-height:24px}
14
  .chosen-container-single .chosen-default{color:#999}.chosen-container-single .chosen-single span{display:block;overflow:hidden;margin-right:26px;text-overflow:ellipsis;white-space:nowrap}
1
+ .chosen-container{position:relative;display:inline-block;vertical-align:middle;font-size:13px;zoom:1;*display:inline;-webkit-user-select:none;-moz-user-select:none;user-select:none}
 
 
 
 
 
 
 
 
 
 
2
  .chosen-container .chosen-drop{position:absolute;top:100%;left:-9999px;z-index:1010;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;width:100%;border:1px solid #aaa;border-top:0;background:#fff;box-shadow:0 4px 5px rgba(0,0,0,0.15)}
3
  .chosen-container.chosen-with-drop .chosen-drop{left:0}.chosen-container a{cursor:pointer}.chosen-container-single .chosen-single{position:relative;display:block;overflow:hidden;padding:0 0 0 8px;height:23px;border:1px solid #aaa;border-radius:5px;background-color:#fff;background:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#fff),color-stop(50%,#f6f6f6),color-stop(52%,#eee),color-stop(100%,#f4f4f4));background:-webkit-linear-gradient(top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background:-moz-linear-gradient(top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background:-o-linear-gradient(top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background:linear-gradient(top,#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background-clip:padding-box;box-shadow:0 0 3px white inset,0 1px 1px rgba(0,0,0,0.1);color:#444;text-decoration:none;white-space:nowrap;line-height:24px}
4
  .chosen-container-single .chosen-default{color:#999}.chosen-container-single .chosen-single span{display:block;overflow:hidden;margin-right:26px;text-overflow:ellipsis;white-space:nowrap}