Update Control - Version 1.2.1

Version Description

  • Make Advanced Settings UI a bit more intuitive.
Download this release

Release Info

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

Code changes from version 1.2 to 1.2.1

Files changed (2) hide show
  1. readme.txt +5 -2
  2. update-control.php +7 -7
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
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -60,7 +60,7 @@ Plugin/Theme/Translation Updates:
60
  * If you disable updates, Plugin, Theme, and Translation updates will also be disabled
61
  * Separately enable Plugin, Theme, and Translation updates via the appropriate checkboxes
62
 
63
- = What are advanced options? =
64
 
65
  Disable VCS Check
66
 
@@ -77,6 +77,9 @@ Debug Email
77
 
78
  == Changelog ==
79
 
 
 
 
80
  = 1.2 =
81
  * Feature Update. Add advanced options toggle, and options for VCS check disabling and debug email.
82
 
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
 
60
  * If you disable updates, Plugin, Theme, and Translation updates will also be disabled
61
  * Separately enable Plugin, Theme, and Translation updates via the appropriate checkboxes
62
 
63
+ = What are advanced settings? =
64
 
65
  Disable VCS Check
66
 
77
 
78
  == Changelog ==
79
 
80
+ = 1.2.1 =
81
+ * Make Advanced Settings UI a bit more intuitive.
82
+
83
  = 1.2 =
84
  * Feature Update. Add advanced options toggle, and options for VCS check disabling and debug email.
85
 
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
8
  * Author URI: http://stephanis.info/
9
  */
10
 
@@ -85,7 +85,7 @@ class Stephanis_Update_Control {
85
  'plugin' => false,
86
  'theme' => false,
87
  'translation' => true,
88
- 'toggleadvanced' => 'no',
89
  'vcscheck' => true,
90
  'emailactive' => 'yes',
91
  'successemail' => true,
@@ -159,7 +159,7 @@ class Stephanis_Update_Control {
159
 
160
  add_settings_field(
161
  'update_control_toggleadvanced',
162
- sprintf( '<label for="update_control_toggleadvanced">%1$s</label>', __( 'Configure Advanced Options?', 'update-control' ) ),
163
  array( __CLASS__, 'update_control_toggleadvanced_cb' ),
164
  'general',
165
  'update-control'
@@ -238,7 +238,7 @@ class Stephanis_Update_Control {
238
  }).trigger('change');
239
 
240
  $('#update_control_toggleadvanced').change(function(){
241
- if ( 'no' != $(this).val() ) {
242
  $('.update_control_advanced').parent().parent().css( { 'display' : 'table-row' } );
243
  $('.update_control_advanced').parent().siblings( 'th' ).css( { 'display' : 'block', 'padding-left' : '20px' } );
244
  } else {
@@ -306,8 +306,8 @@ class Stephanis_Update_Control {
306
  public static function update_control_toggleadvanced_cb() {
307
  ?>
308
  <select class="update_control_dependency" id="update_control_toggleadvanced" name="update_control_options[toggleadvanced]">
309
- <option <?php selected( 'yes' == self::get_option( 'toggleadvanced' ) ); ?> value="yes"><?php _e( 'Yes', 'update-control' ); ?></option>
310
- <option <?php selected( 'no' == self::get_option( 'toggleadvanced' ) ); ?> value="no"><?php _e( 'No', 'update-control' ); ?></option>
311
  </select>
312
  <?php
313
  }
@@ -359,7 +359,7 @@ class Stephanis_Update_Control {
359
  $options['plugin'] = ! empty( $options['plugin'] );
360
  $options['theme'] = ! empty( $options['theme'] );
361
  $options['translation'] = ! empty( $options['translation'] );
362
- $options['toggleadvanced'] = 'no';
363
  $options['vcscheck'] = ! empty( $options['vcscheck'] );
364
  $options['emailactive'] = ( in_array( $options['emailactive'], array( 'yes', 'no' ) ) ? $options['emailactive'] : 'yes' );
365
  $options['successemail'] = ! empty( $options['successemail'] );
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
 
85
  'plugin' => false,
86
  'theme' => false,
87
  'translation' => true,
88
+ 'toggleadvanced' => 'hide',
89
  'vcscheck' => true,
90
  'emailactive' => 'yes',
91
  'successemail' => true,
159
 
160
  add_settings_field(
161
  'update_control_toggleadvanced',
162
+ sprintf( '<label for="update_control_toggleadvanced">%1$s</label>', __( 'Advanced Settings', 'update-control' ) ),
163
  array( __CLASS__, 'update_control_toggleadvanced_cb' ),
164
  'general',
165
  'update-control'
238
  }).trigger('change');
239
 
240
  $('#update_control_toggleadvanced').change(function(){
241
+ if ( 'hide' != $(this).val() ) {
242
  $('.update_control_advanced').parent().parent().css( { 'display' : 'table-row' } );
243
  $('.update_control_advanced').parent().siblings( 'th' ).css( { 'display' : 'block', 'padding-left' : '20px' } );
244
  } else {
306
  public static function update_control_toggleadvanced_cb() {
307
  ?>
308
  <select class="update_control_dependency" id="update_control_toggleadvanced" name="update_control_options[toggleadvanced]">
309
+ <option <?php selected( 'show' == self::get_option( 'toggleadvanced' ) ); ?> value="show"><?php _e( 'Show', 'update-control' ); ?></option>
310
+ <option <?php selected( 'hide' == self::get_option( 'toggleadvanced' ) ); ?> value="hide"><?php _e( 'Hide', 'update-control' ); ?></option>
311
  </select>
312
  <?php
313
  }
359
  $options['plugin'] = ! empty( $options['plugin'] );
360
  $options['theme'] = ! empty( $options['theme'] );
361
  $options['translation'] = ! empty( $options['translation'] );
362
+ $options['toggleadvanced'] = 'hide';
363
  $options['vcscheck'] = ! empty( $options['vcscheck'] );
364
  $options['emailactive'] = ( in_array( $options['emailactive'], array( 'yes', 'no' ) ) ? $options['emailactive'] : 'yes' );
365
  $options['successemail'] = ! empty( $options['successemail'] );