Update Control - Version 1.3

Version Description

  • Maintenance Update. Add multisite awareness, more FAQs.
Download this release

Release Info

Developer chipbennett
Plugin Icon wp plugin Update Control
Version 1.3
Comparing to
See all releases

Code changes from version 1.2.1 to 1.3

Files changed (2) hide show
  1. readme.txt +12 -1
  2. update-control.php +14 -3
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: georgestephanis, chipbennett
3
  Tags: automatic updates, updates
4
  Requires at least: 3.7
5
  Tested up to: 3.7
6
- Stable tag: 1.2.1
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -36,6 +36,8 @@ Plugin settings can be found under Settings -> General.
36
 
37
  Not having a separate settings page is a decision based on UI philosophy. The Plugin simply isn't complex enough to warrant a separate settings page. Perhaps a different admin page, such as Dashboard -> Updates, would be more appropriate; however, core does not provide a way to hook into that page to add settings sections.
38
 
 
 
39
  = How do I use this Plugin in a multisite network? =
40
 
41
  Activate the Plugin on the main network site, and configure options via Settings -> General.
@@ -75,8 +77,17 @@ Debug Email
75
 
76
  * Enable this option to enable the debug email. This email is sent after ever occurrence of an attempted update, for core, Plugins, Themes, and translation files; and whether the attempt succeeds, fails, or fails critically.
77
 
 
 
 
 
 
 
78
  == Changelog ==
79
 
 
 
 
80
  = 1.2.1 =
81
  * Make Advanced Settings UI a bit more intuitive.
82
 
3
  Tags: automatic updates, updates
4
  Requires at least: 3.7
5
  Tested up to: 3.7
6
+ Stable tag: 1.3
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
36
 
37
  Not having a separate settings page is a decision based on UI philosophy. The Plugin simply isn't complex enough to warrant a separate settings page. Perhaps a different admin page, such as Dashboard -> Updates, would be more appropriate; however, core does not provide a way to hook into that page to add settings sections.
38
 
39
+ This Plugin is intentionally very simple. If you want a Plugin with more complexity and its own settings page, you might want to check out [Automatic Updater](http://wordpress.org/plugins/automatic-updater).
40
+
41
  = How do I use this Plugin in a multisite network? =
42
 
43
  Activate the Plugin on the main network site, and configure options via Settings -> General.
77
 
78
  * Enable this option to enable the debug email. This email is sent after ever occurrence of an attempted update, for core, Plugins, Themes, and translation files; and whether the attempt succeeds, fails, or fails critically.
79
 
80
+ = Why don't automatic updates happen right away? =
81
+
82
+ You may find that you receive an update notification, but automatic updates don't happen right away. That's okay! WordPress performs automatic updates according to timing based on certain transient values, and it is possible for the update check to happen some time before the automatic update routine executes. The Plugin doesn't modify the timing of the automatic update routine; rather, it just tells WordPress which update types are enabled.
83
+
84
+ Also, core now has two separate types of updates: manual updates and automatic updates. When you see the manual upgrade notice, WordPress has received the manual update offer, but has not yet received the automatic update offer. The two offers are fetched based on two different transients, and do not happen at the same time. Automatic core updates are served on a staggered rollout, which means that it may take up to 36 hours for the automatic update to execute after receiving the manual upgrade notice. For Plugins and Themes, you should normally see the automatic update routine execute within 12 hours of receiving the manual upgrade notice.
85
+
86
  == Changelog ==
87
 
88
+ = 1.3 =
89
+ * Maintenance Update. Add multisite awareness, more FAQs.
90
+
91
  = 1.2.1 =
92
  * Make Advanced Settings UI a bit more intuitive.
93
 
update-control.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin URI: http://github.com/georgestephanis/update-control/
5
  * Description: Adds a manual toggle to the WordPress Admin Interface for managing auto-updates.
6
  * Author: George Stephanis
7
- * Version: 1.2.1
8
  * Author URI: http://stephanis.info/
9
  */
10
 
@@ -14,8 +14,15 @@
14
  class Stephanis_Update_Control {
15
 
16
  public static function go() {
17
- add_action( 'admin_init', array( __CLASS__, 'register_settings' ) );
18
- add_action( 'init', array( __CLASS__, 'setup_upgrade_filters' ) );
 
 
 
 
 
 
 
19
  }
20
 
21
  public static function setup_upgrade_filters() {
@@ -225,6 +232,10 @@ class Stephanis_Update_Control {
225
  <p id="update-control-settings-section">
226
  <?php _e( 'This section lets you specify what areas of your WordPress install will be permitted to auto-update.', 'update-control' ); ?>
227
  </p>
 
 
 
 
228
  <script>
229
  jQuery(document).ready(function($){
230
  $('#update_control_active').change(function(){
4
  * Plugin URI: http://github.com/georgestephanis/update-control/
5
  * Description: Adds a manual toggle to the WordPress Admin Interface for managing auto-updates.
6
  * Author: George Stephanis
7
+ * Version: 1.3
8
  * Author URI: http://stephanis.info/
9
  */
10
 
14
  class Stephanis_Update_Control {
15
 
16
  public static function go() {
17
+ if ( is_multisite() && ! is_main_site() ) {
18
+ // Multisite check
19
+ // only run on the main site of a multisite network
20
+ return;
21
+ } else {
22
+ // Let's roll!
23
+ add_action( 'admin_init', array( __CLASS__, 'register_settings' ) );
24
+ add_action( 'init', array( __CLASS__, 'setup_upgrade_filters' ) );
25
+ }
26
  }
27
 
28
  public static function setup_upgrade_filters() {
232
  <p id="update-control-settings-section">
233
  <?php _e( 'This section lets you specify what areas of your WordPress install will be permitted to auto-update.', 'update-control' ); ?>
234
  </p>
235
+ <?php
236
+ $update_core_obj = get_site_transient( 'update_core' );
237
+ $last_checked = $update_core_obj->last_checked;
238
+ ?>
239
  <script>
240
  jQuery(document).ready(function($){
241
  $('#update_control_active').change(function(){