Easy Updates Manager - Version 2.0.0

Version Description

  • Settings Page Added
  • Disable One, Two, or Three Feature Added
  • Updated Screenshots
  • Updated Readme.txt
Download this release

Release Info

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

Version 2.0.0

Files changed (2) hide show
  1. Function.php +320 -0
  2. readme.txt +224 -0
Function.php ADDED
@@ -0,0 +1,320 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @package Disable All Updates
4
+ * @author Websiteguy
5
+ * @version 2.0.0
6
+ */
7
+ /*
8
+ Plugin Name: Disable All Updates
9
+ Plugin URI: http://wordpress.org/plugins/stops-core-theme-and-plugin-updates/
10
+ Version: 2.0.0
11
+ Description: A simple WordPress plugin that disables all the updating of plugins, themes, and the WordPress core. Just fill out the settings.
12
+ Author: kidsguide
13
+ Author URL: http://profiles.wordpress.org/kidsguide/
14
+ Compatible with WordPress 2.3+.
15
+ */
16
+ /*
17
+ Copyright 2013 Websiteguy (email : mpsparrow@cogeco.ca)
18
+
19
+ This program is free software; you can redistribute it and/or modify
20
+ it under the terms of the GNU General Public License, version 2, as
21
+ published by the Free Software Foundation.
22
+
23
+ This program is distributed in the hope that it will be useful,
24
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
25
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26
+ GNU General Public License for more details.
27
+
28
+ You should have received a copy of the GNU General Public License
29
+ along with this program; if not, write to the Free Software
30
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
31
+ */
32
+
33
+ class Update_Notifications {
34
+
35
+
36
+ private $status = array(); // Set $status in array
37
+ private $checkboxes = array(); // Set $checkboxes in array
38
+
39
+ function Update_Notifications()
40
+ {
41
+
42
+
43
+ // Add translations
44
+ if (function_exists('load_plugin_textdomain'))
45
+ load_plugin_textdomain( 'update-notifications-manager', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/');
46
+
47
+ // Add menu page
48
+ add_action('admin_menu', array(&$this, 'add_submenu'));
49
+
50
+ // Settings API
51
+ add_action('admin_init', array(&$this, 'register_setting'));
52
+
53
+
54
+ // load the values recorded
55
+ $this->load_update_notifications();
56
+
57
+ }
58
+
59
+
60
+
61
+ /* Register settings via the WP Settings API */
62
+ function register_setting()
63
+ {
64
+ register_setting('_update_notifications', '_update_notifications', array(&$this, 'validate_settings'));
65
+ }
66
+
67
+ function validate_settings( $input ) {
68
+
69
+ $options = get_option( '_update_notifications' );
70
+
71
+ foreach ( $this->checkboxes as $id ) {
72
+ if ( isset( $options[$id] ) && !isset( $input[$id] ) )
73
+ unset( $options[$id] );
74
+ }
75
+
76
+ return $input;
77
+ }
78
+
79
+ function add_submenu()
80
+ {
81
+
82
+ // Add submenu in menu "Settings"
83
+ add_submenu_page( 'index.php', 'Disable All Updates', __('Disable All Updates','update-notifications-manager'), 'administrator', __FILE__, array(&$this, 'display_page') );
84
+ }
85
+
86
+ function load_update_notifications()
87
+ {
88
+
89
+ $this->status = get_option('_update_notifications');
90
+
91
+ if( !$this->status ) return;
92
+
93
+ foreach( $this->status as $id => $value ) {
94
+
95
+ switch( $id ) {
96
+
97
+ case 'plugin' :
98
+
99
+ // Disable plugin updates
100
+ // Disable Updates
101
+ remove_action( 'load-update-core.php', 'wp_update_plugins' );
102
+ add_filter( 'pre_site_transient_update_plugins', create_function( '$a', "return null;" ) );
103
+
104
+ // Update E-mails
105
+ apply_filters( 'auto_plugin_update_send_email', false, $type, $plugin_update, $result );
106
+
107
+ // Remove Files
108
+ function admin_init_1() {
109
+ if ( !function_exists("remove_action") ) return;
110
+
111
+ remove_action( 'load-plugins.php', 'wp_update_plugins' );
112
+ remove_action( 'load-update.php', 'wp_update_plugins' );
113
+ remove_action( 'admin_init', '_maybe_update_plugins' );
114
+ remove_action( 'wp_update_plugins', 'wp_update_plugins' );
115
+ wp_clear_scheduled_hook( 'wp_update_plugins' );
116
+
117
+ remove_action( 'load-update-core.php', 'wp_update_plugins' );
118
+ wp_clear_scheduled_hook( 'wp_update_plugins' );
119
+ }
120
+
121
+ break;
122
+
123
+ case 'theme' :
124
+
125
+ // Disable theme updates
126
+ // Disable Updates
127
+ remove_action( 'load-update-core.php', 'wp_update_themes' );
128
+ add_filter( 'pre_site_transient_update_themes', create_function( '$a', "return null;" ) );
129
+
130
+ // Update E-mails
131
+ apply_filters( 'auto_theme_update_send_email', false, $type, $theme_update, $result );
132
+
133
+ // Remove Files
134
+ function admin_init_2() {
135
+ if ( !function_exists("remove_action") ) return;
136
+
137
+ remove_action( 'load-themes.php', 'wp_update_themes' );
138
+ remove_action( 'load-update.php', 'wp_update_themes' );
139
+ remove_action( 'admin_init', '_maybe_update_themes' );
140
+ remove_action( 'wp_update_themes', 'wp_update_themes' );
141
+ wp_clear_scheduled_hook( 'wp_update_themes' );
142
+
143
+ remove_action( 'load-update-core.php', 'wp_update_themes' );
144
+ wp_clear_scheduled_hook( 'wp_update_themes' );
145
+
146
+ }
147
+
148
+ break;
149
+
150
+ case 'core' :
151
+
152
+ // Disable WordPress core update
153
+ // Disable Updates
154
+ remove_action( 'load-update-core.php', 'wp_update_core' );
155
+ add_filter( 'pre_site_transient_update_core', create_function( '$a', "return null;" ) );
156
+
157
+ // Update E-mails
158
+ apply_filters( 'auto_core_update_send_email', false, $type, $core_update, $result );
159
+
160
+ // Remove Files
161
+ function admin_init_3() {
162
+ if ( !function_exists("remove_action") ) return;
163
+
164
+ remove_action( 'wp_version_check', 'wp_version_check' );
165
+ remove_action( 'admin_init', '_maybe_update_core' );
166
+ wp_clear_scheduled_hook( 'wp_version_check' );
167
+
168
+ wp_clear_scheduled_hook( 'wp_version_check' );
169
+ }
170
+
171
+ break;
172
+
173
+ case 'page' :
174
+
175
+ // Remove Updates Page
176
+
177
+ add_action('admin_menu', 'remove_menus', 102);
178
+ function remove_menus() {
179
+ global $submenu;
180
+ remove_submenu_page ( 'index.php', 'update-core.php' );
181
+ }
182
+
183
+ break;
184
+
185
+ case 'all' :
186
+
187
+ // Remove Notifications
188
+
189
+ add_action('admin_menu','hide_admin_notices');
190
+ function hide_admin_notices() {
191
+ remove_action( 'admin_notices', 'update_nag', 3 );
192
+ }
193
+
194
+
195
+ break;
196
+
197
+
198
+
199
+
200
+ }
201
+
202
+ }
203
+
204
+ }
205
+
206
+ function display_page()
207
+ {
208
+
209
+ // Check if user can access to the plugin
210
+ if (!current_user_can('update_core'))
211
+ wp_die( __('You do not have sufficient permissions to access this page.') );
212
+
213
+ ?>
214
+
215
+ <div class="wrap">
216
+ <div id="icon-options-general" class="icon32"></div>
217
+ <h2><?php _e('Disable All Updates Settings','update-notifications-manager'); ?></h2>
218
+
219
+ <form method="post" action="options.php">
220
+
221
+ <?php settings_fields('_update_notifications'); ?>
222
+
223
+ <table class="form-table">
224
+ <tr>
225
+ <th scope="row"><?php _e('Disable Updates and Other Settings:', 'update-notifications-manager') ?></th>
226
+ <td>
227
+ <fieldset>
228
+ <legend class="screen-reader-text"><span><?php _e('Disable Updates and Other Settings:', 'update-notifications-manager') ?></span></legend>
229
+ <label for="plugins_notify">
230
+ <input type="checkbox" <?php checked(1, (int)$this->status['plugin'], true); ?> value="1" id="plugins_notify" name="_update_notifications[plugin]"> <?php _e('Disable Plugin Updates', 'update-notifications-manager') ?>
231
+ </label>
232
+ <br>
233
+ <label for="themes_notify">
234
+ <input type="checkbox" <?php checked(1, (int)$this->status['theme'], true); ?> value="1" id="themes_notify" name="_update_notifications[theme]"> <?php _e('Disable Theme Updates', 'update-notifications-manager') ?>
235
+ </label>
236
+ <br>
237
+ <label for="core_notify">
238
+ <input type="checkbox" <?php checked(1, (int)$this->status['core'], true); ?> value="1" id="core_notify" name="_update_notifications[core]"> <?php _e('Disable WordPress Core Update', 'update-notifications-manager') ?>
239
+ </label>
240
+ <br>
241
+ <label for="page_notify">
242
+ <input type="checkbox" <?php checked(1, (int)$this->status['page'], true); ?> value="1" id="page_notify" name="_update_notifications[page]"> <?php _e('Remove Updates Page (Under Dashboard)', 'update-notifications-manager') ?>
243
+ </label>
244
+ <br>
245
+ <label for="all_notify">
246
+ <input type="checkbox" <?php checked(1, (int)$this->status['all'], true); ?> value="1" id="all_notify" name="_update_notifications[all]"> <?php _e('Remove Notices (For All)', 'update-notifications-manager') ?>
247
+ </label>
248
+ </fieldset>
249
+ </td>
250
+ </tr>
251
+ </table>
252
+
253
+ <p class="submit">
254
+ <input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
255
+ </p>
256
+
257
+ </form>
258
+ </div>
259
+
260
+ <?php
261
+ }
262
+ }
263
+
264
+ // Start this plugin once all other plugins are fully loaded
265
+ global $Update_Notifications; $Update_Notifications = new Update_Notifications();
266
+
267
+ // Plugin Page Links
268
+
269
+ add_filter( 'plugin_row_meta', 'thsp_plugin_meta_links', 10, 2 );
270
+
271
+ function thsp_plugin_meta_links( $links, $file ) {
272
+ $plugin = plugin_basename(__FILE__);
273
+
274
+ // Create links
275
+
276
+ if ( $file == $plugin ) {
277
+ return array_merge(
278
+ $links,
279
+ array( '<a href="http://www.wordpress.org/support/plugin/stops-core-theme-and-plugin-updates">Support</a>' ),
280
+ array( '<a href="http://www.wordpress.org/plugins/stops-core-theme-and-plugin-updates/faq/">FAQ</a>' ),
281
+ array( '<a href="http://www.youtube.com/watch?v=ZSJf9nwP7oA">Tutorial</a>' )
282
+ );
283
+ }
284
+ return $links;
285
+ }
286
+
287
+ // Admin Notices
288
+
289
+ function thsp_admin_notices() {
290
+ global $current_user;
291
+ $userid = $current_user->ID;
292
+ global $pagenow;
293
+ if ( !get_user_meta( $userid, 'ignore_sample_error_notice' ) ) {
294
+
295
+ // Text for Admin Notice
296
+
297
+ echo '
298
+ <div class="updated">
299
+ <p>Thanks for using Disable All Updates version 1.9.0.
300
+ <br />
301
+ <strong>Status:</strong>
302
+ <marquee direction="right" width="270px" style="border:GREY 1px Dotted">Working...</marquee>
303
+ <br />
304
+ <a href="?dismiss_me=yes">Hide Notice</a>
305
+ </p>
306
+ </div>';
307
+ }
308
+ }
309
+ add_action( 'admin_notices', 'thsp_admin_notices' );
310
+
311
+ // Action for Hide Notice Text
312
+
313
+ function thsp_dismiss_admin_notice() {
314
+ global $current_user;
315
+ $userid = $current_user->ID;
316
+ if ( isset($_GET['example_nag_ignore']) && '3' == $_GET['example_nag_ignore'] ) {
317
+ add_user_meta($user_id, 'example_ignore_notice', 'true', true);
318
+ }
319
+ }
320
+ add_action( 'admin_init', 'thsp_dismiss_admin_notice' );
readme.txt ADDED
@@ -0,0 +1,224 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === Disable All Updates ===
2
+
3
+ Contributors: kidsguide, Chris Collins
4
+ Tags: Disable, Plugin, Updates, WordPress Core, Core, Theme, Themes, Theme Update, WordPress Core Update
5
+ , No Updates, Stop Updates, Disable All Updates, Disable Updates
6
+ Requires at least: 2.4
7
+ Tested up to: 3.8
8
+ Stable tag: trunk
9
+
10
+
11
+ A simple WordPress plugin that disables all the updating of plugins, themes, and the WordPress core.
12
+
13
+
14
+
15
+ == Description ==
16
+
17
+
18
+ This plugin simple removes the updating of the plugins, theme, and even the WordPress core.
19
+ This way you can pick your favourite version of the plugin (theme, or WordPress core).
20
+
21
+ This plugin is simple and easy.
22
+
23
+ Their are settings for this plugin under the Dashboard.
24
+
25
+ This plugin is better then any other plugin in its class because it
26
+ <ol>
27
+ <li>Turns of WordPress automatic updates</li>
28
+ <li>It disables e-mail noticfactions for updates</li>
29
+ <li>Removes the WordPress update files</li>
30
+ </ol>
31
+
32
+ And More...
33
+
34
+ = Video Tutorial =
35
+ [youtube http://www.youtube.com/watch?v=ZSJf9nwP7oA]
36
+
37
+ = Just Won't to Disable One or Two? =
38
+ <ol>
39
+ <li><a href="http://wordpress.org/plugins/disable-core-updates">Disable Core Updates</a></li>
40
+ <li><a href="http://wordpress.org/plugins/disable-theme-updates">Disable Theme Updates</a></li>
41
+ <li><a href="http://wordpress.org/plugins/disable-plugin-updates">Disable Plugin Updates</a></li>
42
+ </ol>
43
+
44
+ = Check Out Our Newest Plugin! =
45
+ <li><a href="http://wordpress.org/plugins/remove-the-updates-submenu/">Remove the Updates Submenu</a></li>
46
+ It removes the updates submenu.
47
+
48
+ == Frequently Asked Questions ==
49
+ = Q: Is their a way to disable only one or two of these? =
50
+ A: Yes, in the settings you can disable one, two, or three.
51
+
52
+
53
+ = Q: How is this plugin diferent from the other disable updates plugins? =
54
+ A: Their are a couple of differences.
55
+ <ol>
56
+ <li>They do not disable WordPress automatic updates.</li>
57
+ <li>They do not have video tutorials and screenshots.</li>
58
+ <li>They do not have settings to disable one, two, or three.</li>
59
+ </ol>
60
+
61
+ = Q: If I disable this plugin, will I be able to update my plugins, themes, and core again? =
62
+ A: Yes, this plugin just stops (or disables) the update, it does not delete them.
63
+
64
+
65
+
66
+ == ==
67
+
68
+ = Please note!!! =
69
+
70
+
71
+ It is very important to keep your WordPress plugins, core, and themes up to date.
72
+ If you use this plugin, make sure your plugins are not harming your website.
73
+
74
+ = No Downloads For Some Versions =
75
+ If you were wondering why their are no downloads available for some of our this plugins versions, its because the versions are full of bugs.
76
+
77
+
78
+
79
+
80
+ == Screenshots ==
81
+ 1. Before View Core (Dashboard)
82
+ 4. Before View Plugin (Plugin Page)
83
+ 5. After View Plugin (Plugin Page)
84
+ 2. Before View (Dashboard)
85
+ 3. After View (Dashboard)
86
+ 6. Settings Page (Disable All Updates)
87
+
88
+ == Installation ==
89
+
90
+
91
+ Their are three way to install Disable All Updates.
92
+
93
+ <strong>1)</strong> The WordPress dashboard way.
94
+
95
+ <ol>
96
+ <li>Push the button above to download the latest version of Disable All Updates.</li>
97
+ <li>Go in your websites admin to the Plugins> Add New> page and push Upload.</li>
98
+
99
+ <li>Upload the zip file and push install.</li>
100
+ <li>Go to the Plugins section in your admin dashboard and activate.</li>
101
+ </ol>
102
+
103
+ <strong>2)</strong> The dashboard way. <u><strong>Recommended</strong></u>
104
+
105
+ <ol>
106
+ <li>Go in your websites admin to the Plugins> Add New> page and push on the search bar.</li>
107
+
108
+ <li>Search "Disable All Updates" and push install.</li>
109
+ <li>Go to the Plugins section in your admin dashboard and activate.</li>
110
+ </ol>
111
+
112
+ <strong>3)</strong> The cpanel (or whatever you use) way.
113
+
114
+ <ol>
115
+ <li>Push the button above to download the latest version of Disable All Updates.</li>
116
+ <li>Login into your cpanel (or whatever you use).</li>
117
+ <li>Go to your www file and find the file titled plugins.</li>
118
+ <li>Push on the plugins file and add a new folder titled "disable-all-updates".</li>
119
+ <li>Then upload the zip file into that folder.</li>
120
+ <li>Go to your plugin page in your dashboard and activate the plugin called "Disable All Updates.</li>
121
+ </ol>
122
+
123
+ == Changelog ==
124
+
125
+
126
+
127
+ = Versions Available for Downloading =
128
+ = 2.0.0 =
129
+ * Settings Page Added
130
+ * Disable One, Two, or Three Feature Added
131
+ * Updated Screenshots
132
+ * Updated Readme.txt
133
+
134
+
135
+ = 1.9.0 =
136
+ * Admin Notice Added
137
+ * FAQ Error Fixed
138
+ * HTML Notes and Some HTML Updated
139
+ * Links Added Under Plugin in Dashboard (Support Forum, FAQ, Tutorial)
140
+ * Updated Readme.txt
141
+
142
+ = 1.8.0 =
143
+ * FAQ Added
144
+ * HTML Notes Edited
145
+ * Updated Readme.txt
146
+
147
+ = 1.7.1 =
148
+ * Screenshot Error Fixed
149
+ * Installation Error Fixed
150
+
151
+ = 1.7.0 =
152
+ * New Html Code Added (this code disables WordPress automatic updates)
153
+ * New Version Numbers (now going up by .1.0)
154
+ * Updated Readme.txt (mostly under Installation)
155
+
156
+ = 1.6.0 =
157
+ * Updated Readme.txt
158
+ * Fixed HTML Error
159
+ * Video Tutorial Added
160
+
161
+ = 1.5 =
162
+ * Updated Readme.txt
163
+ * Fixed HTML Spacing
164
+
165
+ = 1.4 =
166
+ * Updated Reame.txt
167
+ * Updated HTML Notes
168
+
169
+ = 1.3 =
170
+ * Updated Readme.txt
171
+ * Added a Disable Updates Check Feature
172
+
173
+ = 1.2 =
174
+ * Updated Readme.txt
175
+ * Updated HTML Notes
176
+ * Added Disable Update E-mails HTML (Note: This code will only work for some plugins)
177
+
178
+ = 1.1 =
179
+ * Screenshots Updated
180
+ * Fixed Error
181
+
182
+ = 1.0.0 =
183
+ * Fixed Changelog Problem
184
+ * HTML Changed
185
+ * Updated Readme.txt
186
+ * Works with WordPress 3.8
187
+
188
+ = 0.9 =
189
+ * Readme.txt Updated
190
+
191
+ = 0.8 =
192
+ * Readme.txt Updated
193
+ * Bugs Fixed: 1
194
+
195
+ = 0.7 =
196
+ * readme.txt Updated Thanks <strong>itsjustathought</strong>
197
+ * Screenshots Added
198
+ * Screenshot Problem Fixed
199
+ * Bugs Fixed: 2
200
+
201
+ = 0.6 =
202
+ * readme.txt Updated
203
+
204
+ = 0.5 =
205
+ * readme.txt Updated
206
+ * Bugs Fixed: 2
207
+
208
+ = Not Available for Downloading = <small>for more information on this, please see the <a href="http://wordpress.org/plugins/stops-core-theme-and-plugin-updates/other_notes/">other notes</a> page.</small>
209
+
210
+ = 0.4 =
211
+ * readme.txt Updated
212
+ * Bugs Fixed: 1
213
+
214
+ = 0.3 =
215
+ * readme.txt Updated
216
+ * Bugs Fixed: 2
217
+
218
+ = 0.2 =
219
+ * Readme.txt Updated
220
+
221
+ = 0.1 =
222
+
223
+ * Published on Wordpress.org
224
+ (September 1, 2013)