Easy Updates Manager - Version 5.4.5

Version Description

Released 2016-04-29

  • Bug fix: Resolving PHP error notices in dashboard
  • Numerous dashboard improvements and a spinner to show save progress
  • Fixing bug in Multisite where the same user is showing up multiple times
Download this release

Release Info

Developer ronalfy
Plugin Icon 128x128 Easy Updates Manager
Version 5.4.5
Comparing to
See all releases

Code changes from version 5.4.3 to 5.4.5

css/style.css CHANGED
@@ -62,6 +62,9 @@
62
  border-radius: 15px;
63
  float: right;
64
  }
 
 
 
65
 
66
  .dashboard-item-choice input + label:before {
67
  content: "";
62
  border-radius: 15px;
63
  float: right;
64
  }
65
+ .dashboard-item-choice .mpsum-spinner {
66
+ float: right;
67
+ }
68
 
69
  .dashboard-item-choice input + label:before {
70
  content: "";
images/index.php ADDED
File without changes
images/spinner.gif ADDED
Binary file
includes/MPSUM_Admin.php CHANGED
@@ -169,7 +169,8 @@ class MPSUM_Admin {
169
  return;
170
  }
171
 
172
- wp_enqueue_script( 'mpsum_dashboard', MPSUM_Updates_Manager::get_plugin_url( '/js/admin.js' ), array( 'jquery' ), '20151125', true );
 
173
  wp_enqueue_style( 'mpsum_dashboard', MPSUM_Updates_Manager::get_plugin_url( '/css/style.css' ), array(), '20151125' );
174
  }
175
 
169
  return;
170
  }
171
 
172
+ wp_enqueue_script( 'mpsum_dashboard', MPSUM_Updates_Manager::get_plugin_url( '/js/admin.js' ), array( 'jquery' ), '20160429', true );
173
+ wp_localize_script( 'mpsum_dashboard', 'mpsum', array( 'spinner' => MPSUM_Updates_Manager::get_plugin_url( '/images/spinner.gif' ) ) );
174
  wp_enqueue_style( 'mpsum_dashboard', MPSUM_Updates_Manager::get_plugin_url( '/css/style.css' ), array(), '20151125' );
175
  }
176
 
includes/MPSUM_Admin_Advanced.php CHANGED
@@ -154,7 +154,7 @@ class MPSUM_Admin_Advanced {
154
  if ( is_multisite() ) {
155
  global $wpdb;
156
  $logins = implode( "', '", get_super_admins() );
157
- $users = $wpdb->get_col( "SELECT ID FROM $wpdb->users WHERE user_login IN ('$logins')" );
158
 
159
  } else {
160
  /**
154
  if ( is_multisite() ) {
155
  global $wpdb;
156
  $logins = implode( "', '", get_super_admins() );
157
+ $users = $wpdb->get_col( "SELECT ID FROM $wpdb->users WHERE user_login IN ('$logins') GROUP BY user_login" );
158
 
159
  } else {
160
  /**
includes/MPSUM_Admin_Dashboard.php CHANGED
@@ -124,17 +124,16 @@ class MPSUM_Admin_Dashboard {
124
  <div class="dashboard-item-header input-radio"><?php esc_html_e( 'Major Releases', 'stops-core-theme-and-plugin-updates' ); ?>
125
  </div><!-- .dashboard-item-header -->
126
  <div class="dashboard-item-choice">
127
- <input type="checkbox" name="options[automatic_major_updates]" value="off" />
128
- <input type="checkbox" data-context="core" data-action="automatic_major_updates" class="dashboard-hide" name="options[all_updates]" value="on" id="automatic_major_on" <?php checked( 'on', $options[ 'automatic_major_updates' ] ); ?> />&nbsp;<label for="automatic_major_on"><?php esc_html_e( 'Enabled', 'stops-core-theme-and-plugin-updates' ); ?></label>
129
  </div><!-- .dashboard-item-choice -->
130
  </div><!-- dashboard-item-->
131
  <div class="dashboard-item <?php if( 'on' == $options[ 'automatic_minor_updates' ] ) { echo 'active'; }?>">
132
  <div class="dashboard-item-header input-radio"><?php esc_html_e( 'Minor Releases', 'stops-core-theme-and-plugin-updates' ); ?>
133
  </div><!-- .dashboard-item-header -->
134
  <div class="dashboard-item-choice">
135
- <input id="core-updates-check_before" type="hidden" value="<?php echo esc_attr( $checked_value ); ?>" />
136
  <input type="hidden" name="options[automatic_minor_updates]" value="on" />
137
- <input id="automatic_minor_on" data-context="core" data-action="automatic_minor_updates" type="checkbox" class="dashboard-hide update-option" name="options[core_updates]" value="off" <?php checked( 'on', $options[ 'automatic_minor_updates' ] ); ?> <?php disabled( true, $disable_core_options ); ?> />&nbsp;<label for="automatic_minor_on"><?php esc_html_e( 'Disabled', 'stops-core-theme-and-plugin-updates' ); ?></label>
138
  </div><!-- .dashboard-item-choice -->
139
  </div><!-- dashboard-item-->
140
  <div class="dashboard-item <?php if( 'on' == $options[ 'automatic_development_updates' ] ) { echo 'active'; }?>">
@@ -149,7 +148,6 @@ class MPSUM_Admin_Dashboard {
149
  <div class="dashboard-item-header input-radio"><?php esc_html_e( 'Translation Updates', 'stops-core-theme-and-plugin-updates' ); ?>
150
  </div><!-- .dashboard-item-header -->
151
  <div class="dashboard-item-choice">
152
- <input id="core-theme-check_before" type="hidden" value="<?php echo esc_attr( $checked_value ); ?>" />
153
  <input type="hidden" name="options[automatic_translation_updates]" value="on" />
154
  <input type="checkbox" data-context="core" data-action="automatic_translation_updates" class="dashboard-hide update-option" name="options[automatic_translation_updates]" value="off" id="automatic_translation_updates_on" <?php checked( 'on', $options[ 'automatic_translation_updates' ] ); ?> <?php disabled( true, $disable_core_options ); ?> />&nbsp;<label for="automatic_translation_updates_on"><?php esc_html_e( 'Disabled', 'stops-core-theme-and-plugin-updates' ); ?></label>
155
  </div><!-- .dashboard-item-choice -->
@@ -420,7 +418,7 @@ class MPSUM_Admin_Dashboard {
420
  <div class="dashboard-item-header input-radio"><?php esc_html_e( 'Core E-mails', 'stops-core-theme-and-plugin-updates' ); ?>
421
  </div><!-- .dashboard-item-header -->
422
  <div class="dashboard-item-choice">
423
- <input type="checkbox" name="options[notification_core_update_emails]" value="off" />
424
  <input type="checkbox" data-context="core" data-action="notification_core_update_emails" class="dashboard-hide" name="options[notification_core_update_emails]" value="off" id="notification_core_update_emails_on" <?php checked( 'on', $options[ 'notification_core_update_emails' ] ); ?> />&nbsp;<label for="notification_core_update_emails_on"><?php esc_html_e( 'Enabled', 'stops-core-theme-and-plugin-updates' ); ?></label>
425
  </div><!-- .dashboard-item-choice -->
426
  </div><!-- dashboard-item-->
124
  <div class="dashboard-item-header input-radio"><?php esc_html_e( 'Major Releases', 'stops-core-theme-and-plugin-updates' ); ?>
125
  </div><!-- .dashboard-item-header -->
126
  <div class="dashboard-item-choice">
127
+ <input type="hidden" name="options[automatic_major_updates]" value="off" />
128
+ <input type="checkbox" data-context="core" data-action="automatic_major_updates" class="dashboard-hide" name="options[automatic_major_updates]" value="on" id="automatic_major_on" <?php checked( 'on', $options[ 'automatic_major_updates' ] ); ?> />&nbsp;<label for="automatic_major_on"><?php esc_html_e( 'Enabled', 'stops-core-theme-and-plugin-updates' ); ?></label>
129
  </div><!-- .dashboard-item-choice -->
130
  </div><!-- dashboard-item-->
131
  <div class="dashboard-item <?php if( 'on' == $options[ 'automatic_minor_updates' ] ) { echo 'active'; }?>">
132
  <div class="dashboard-item-header input-radio"><?php esc_html_e( 'Minor Releases', 'stops-core-theme-and-plugin-updates' ); ?>
133
  </div><!-- .dashboard-item-header -->
134
  <div class="dashboard-item-choice">
 
135
  <input type="hidden" name="options[automatic_minor_updates]" value="on" />
136
+ <input id="automatic_minor_on" data-context="core" data-action="automatic_minor_updates" type="checkbox" class="dashboard-hide update-option" name="options[automatic_minor_updates]" value="off" <?php checked( 'on', $options[ 'automatic_minor_updates' ] ); ?> <?php disabled( true, $disable_core_options ); ?> />&nbsp;<label for="automatic_minor_on"><?php esc_html_e( 'Disabled', 'stops-core-theme-and-plugin-updates' ); ?></label>
137
  </div><!-- .dashboard-item-choice -->
138
  </div><!-- dashboard-item-->
139
  <div class="dashboard-item <?php if( 'on' == $options[ 'automatic_development_updates' ] ) { echo 'active'; }?>">
148
  <div class="dashboard-item-header input-radio"><?php esc_html_e( 'Translation Updates', 'stops-core-theme-and-plugin-updates' ); ?>
149
  </div><!-- .dashboard-item-header -->
150
  <div class="dashboard-item-choice">
 
151
  <input type="hidden" name="options[automatic_translation_updates]" value="on" />
152
  <input type="checkbox" data-context="core" data-action="automatic_translation_updates" class="dashboard-hide update-option" name="options[automatic_translation_updates]" value="off" id="automatic_translation_updates_on" <?php checked( 'on', $options[ 'automatic_translation_updates' ] ); ?> <?php disabled( true, $disable_core_options ); ?> />&nbsp;<label for="automatic_translation_updates_on"><?php esc_html_e( 'Disabled', 'stops-core-theme-and-plugin-updates' ); ?></label>
153
  </div><!-- .dashboard-item-choice -->
418
  <div class="dashboard-item-header input-radio"><?php esc_html_e( 'Core E-mails', 'stops-core-theme-and-plugin-updates' ); ?>
419
  </div><!-- .dashboard-item-header -->
420
  <div class="dashboard-item-choice">
421
+ <input type="hidden" name="options[notification_core_update_emails]" value="off" />
422
  <input type="checkbox" data-context="core" data-action="notification_core_update_emails" class="dashboard-hide" name="options[notification_core_update_emails]" value="off" id="notification_core_update_emails_on" <?php checked( 'on', $options[ 'notification_core_update_emails' ] ); ?> />&nbsp;<label for="notification_core_update_emails_on"><?php esc_html_e( 'Enabled', 'stops-core-theme-and-plugin-updates' ); ?></label>
423
  </div><!-- .dashboard-item-choice -->
424
  </div><!-- dashboard-item-->
js/admin.js CHANGED
@@ -3,17 +3,35 @@ jQuery( document ).ready( function( $ ) {
3
  checkbox_id = $checkbox.attr( 'id' );
4
 
5
  $.each( $checkbox, function() {
6
- data_context = jQuery( this ).data( 'context' );
7
- data_action = jQuery( this ).data( 'action' );
8
- data_checked = jQuery( this ).prop('checked');
 
9
  if ( data_checked ) {
10
  data_checked = 'on';
11
  } else {
12
  data_checked = 'off';
13
  }
14
- data_val = jQuery( this ).val();
 
 
 
 
 
 
 
 
 
15
 
16
- $.post( ajaxurl, { action: 'mpsum_ajax_action', context: data_context, data_action: data_action, _ajax_nonce: $( '#_mpsum' ).val(), checked: data_checked, val: data_val }, function( response ) {
 
 
 
 
 
 
 
 
17
  } );
18
 
19
  } );
@@ -43,7 +61,7 @@ jQuery( document ).ready( function( $ ) {
43
  };
44
 
45
  /* For when other button is clicked */
46
- $( '.dashboard-item' ).on( 'click', function( e ) {
47
  $input_wrapper = jQuery( this );
48
  $radio_boxes = $input_wrapper.find( 'input[type="radio"]:checked' );
49
  if ( $radio_boxes.length > 0 ) {
@@ -55,28 +73,28 @@ jQuery( document ).ready( function( $ ) {
55
  $checked_boxes = $input_wrapper.find( 'input[type="checkbox"]:checked' );
56
  $unchecked_boxes = $input_wrapper.find( 'input:checkbox:not(:checked)' );
57
 
58
- if ( $checked_boxes.length > 0 ) {
59
- if ( $checked_boxes.prop( 'disabled' ) == true ) {
60
- return;
61
- }
62
- $checked_boxes.data( 'value', 'off' );
63
- $checked_boxes.prop( 'checked', false );
64
- $checked_boxes.parent().parent().toggleClass( 'active' );
65
- if ( $checked_boxes.prop( 'id' ) == 'all_updates_off' ) {
66
- eum_toggle_main( $checked_boxes );
67
- }
68
- eum_checkbox_save( $checked_boxes );
69
- } else if( $unchecked_boxes.length > 0 ) {
70
  if ( $unchecked_boxes.prop( 'disabled' ) == true ) {
71
  return;
72
  }
73
- $unchecked_boxes.data( 'value', 'on' );
74
- $unchecked_boxes.prop( 'checked', true );
75
  $unchecked_boxes.parent().parent().toggleClass( 'active' );
76
  if ( $unchecked_boxes.prop( 'id' ) == 'all_updates_off' ) {
77
- eum_toggle_main( $unchecked_boxes );
78
  }
79
  eum_checkbox_save( $unchecked_boxes );
 
 
 
 
 
 
 
 
 
 
 
80
  }
81
  } );
82
 
3
  checkbox_id = $checkbox.attr( 'id' );
4
 
5
  $.each( $checkbox, function() {
6
+ var checkbox = jQuery( this );
7
+ data_context = checkbox.data( 'context' );
8
+ data_action = checkbox.data( 'action' );
9
+ data_checked = checkbox.prop('checked');
10
  if ( data_checked ) {
11
  data_checked = 'on';
12
  } else {
13
  data_checked = 'off';
14
  }
15
+ data_val = checkbox.val();
16
+ if ( checkbox.parent().hasClass( 'multi-choice' ) ) {
17
+ checkbox.parent( '.multi-choice' ).hide();
18
+ checkbox.parent().parent().append( '<div class="mpsum-spinner" id="spinner-' + checkbox.prop( 'id' ) + '"><img src="' + mpsum.spinner + '"></div>' );
19
+ } else {
20
+ checkbox.siblings( 'label' ).hide();
21
+ checkbox.parent().append( '<div class="mpsum-spinner" id="spinner-' + checkbox.prop( 'id' ) + '"><img src="' + mpsum.spinner + '"></div>' );
22
+ }
23
+
24
+
25
 
26
+ $.post( ajaxurl, { action: 'mpsum_ajax_action', context: data_context, data_action: data_action, _ajax_nonce: $( '#_mpsum' ).val(), checked: data_checked, val: data_val }, function( response ) {
27
+ if ( checkbox.parent().hasClass( 'multi-choice' ) ) {
28
+ checkbox.parent().parent().find( '.mpsum-spinner' ).remove();
29
+ checkbox.parent( '.multi-choice' ).show();
30
+ } else {
31
+ checkbox.parent().find( '.mpsum-spinner' ).remove();
32
+ checkbox.siblings( 'label' ).show();
33
+ }
34
+
35
  } );
36
 
37
  } );
61
  };
62
 
63
  /* For when other button is clicked */
64
+ $( '.dashboard-item' ).on( 'change', function( e ) {
65
  $input_wrapper = jQuery( this );
66
  $radio_boxes = $input_wrapper.find( 'input[type="radio"]:checked' );
67
  if ( $radio_boxes.length > 0 ) {
73
  $checked_boxes = $input_wrapper.find( 'input[type="checkbox"]:checked' );
74
  $unchecked_boxes = $input_wrapper.find( 'input:checkbox:not(:checked)' );
75
 
76
+ if ( $unchecked_boxes.length > 0 ) {
 
 
 
 
 
 
 
 
 
 
 
77
  if ( $unchecked_boxes.prop( 'disabled' ) == true ) {
78
  return;
79
  }
80
+ $unchecked_boxes.attr( 'value', 'off' );
81
+ $unchecked_boxes.prop( 'checked', false );
82
  $unchecked_boxes.parent().parent().toggleClass( 'active' );
83
  if ( $unchecked_boxes.prop( 'id' ) == 'all_updates_off' ) {
84
+ eum_toggle_main( $unchecked_boxes );
85
  }
86
  eum_checkbox_save( $unchecked_boxes );
87
+ } else if( $checked_boxes.length > 0 ) {
88
+ if ( $checked_boxes.prop( 'disabled' ) == true ) {
89
+ return;
90
+ }
91
+ $checked_boxes.attr( 'value', 'on' );
92
+ $checked_boxes.prop( 'checked', true );
93
+ $checked_boxes.parent().parent().toggleClass( 'active' );
94
+ if ( $checked_boxes.prop( 'id' ) == 'all_updates_off' ) {
95
+ eum_toggle_main( $checked_boxes );
96
+ }
97
+ eum_checkbox_save( $checked_boxes );
98
  }
99
  } );
100
 
main.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Easy Updates Manager
4
  Plugin URI: https://wordpress.org/plugins/stops-core-theme-and-plugin-updates/
5
  Description: Manage and disable WordPress updates, including core, plugin, theme, and automatic updates - Works with Multisite.
6
  Author: kidsguide, ronalfy, pixolin, roary86
7
- Version: 5.4.3
8
  Requires at least: 4.3
9
  Author URI: https://wordpress.org/plugins/stops-core-theme-and-plugin-updates/
10
  Contributors: kidsguide, ronalfy
@@ -309,7 +309,10 @@ class MPSUM_Updates_Manager {
309
  if ( !wp_verify_nonce( $_POST[ '_ajax_nonce' ], 'mpsum_options_save' ) ) {
310
  die( 'Cheating, huh' );
311
  }
312
-
 
 
 
313
  /* Get Ajax Options */
314
  $context = sanitize_text_field( $_POST[ 'context' ] );
315
  $option = sanitize_text_field( $_POST[ 'data_action' ] );
@@ -321,6 +324,7 @@ class MPSUM_Updates_Manager {
321
  $options = wp_parse_args( $options, MPSUM_Admin_Core::get_defaults() );
322
  if ( 'core' == $context ) {
323
  $options[ $option ] = $option_value;
 
324
  if ( $option == 'automatic_theme_updates' || $option == 'automatic_plugin_updates' ) {
325
  $options[ $option ] = $val;
326
  }
4
  Plugin URI: https://wordpress.org/plugins/stops-core-theme-and-plugin-updates/
5
  Description: Manage and disable WordPress updates, including core, plugin, theme, and automatic updates - Works with Multisite.
6
  Author: kidsguide, ronalfy, pixolin, roary86
7
+ Version: 5.4.5
8
  Requires at least: 4.3
9
  Author URI: https://wordpress.org/plugins/stops-core-theme-and-plugin-updates/
10
  Contributors: kidsguide, ronalfy
309
  if ( !wp_verify_nonce( $_POST[ '_ajax_nonce' ], 'mpsum_options_save' ) ) {
310
  die( 'Cheating, huh' );
311
  }
312
+ error_log( print_r( $_REQUEST, true ) );
313
+ if ( !isset( $_POST[ 'context' ] ) || !isset( $_POST[ 'data_action' ] ) ) {
314
+ die('');
315
+ }
316
  /* Get Ajax Options */
317
  $context = sanitize_text_field( $_POST[ 'context' ] );
318
  $option = sanitize_text_field( $_POST[ 'data_action' ] );
324
  $options = wp_parse_args( $options, MPSUM_Admin_Core::get_defaults() );
325
  if ( 'core' == $context ) {
326
  $options[ $option ] = $option_value;
327
+ error_log( print_r( $options, true ) );
328
  if ( $option == 'automatic_theme_updates' || $option == 'automatic_plugin_updates' ) {
329
  $options[ $option ] = $val;
330
  }
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: kidsguide, ronalfy, pixolin, roary86
3
  Tags: updates manager, easy updates manager, disable updates manager, disable updates, update control, plugin updates, theme updates, core updates, automatic updates, multisite
4
  Requires at least: 4.3
5
  Tested up to: 4.5
6
- Stable tag: 5.4.3
7
  License: GPLv2 or later
8
 
9
  Manage all your WordPress updates, including individual plugin/theme updates, automatic updates, and loads more. Also works with WordPress Multisite.
@@ -94,6 +94,13 @@ For additional information and FAQs for Easy Updates Manager check out our <a hr
94
 
95
  == Changelog ==
96
 
 
 
 
 
 
 
 
97
  = 5.4.3 =
98
  Released 2016-01-15
99
 
@@ -171,6 +178,9 @@ In version 5.0.0 we completely re-wrote the plugin to offer a faster and more se
171
 
172
  == Upgrade Notice ==
173
 
 
 
 
174
  = 5.4.3 =
175
  CSS and JS enhancements for the main dashboard tab
176
 
@@ -202,4 +212,4 @@ Fixing internationalization issues and adding German translation.
202
  Only upgrade if using WordPress 4.3. Many changes to ensure WordPress 4.3 compatibility.
203
 
204
  = 5.0.0 =
205
- Major plugin rewrite and update. Updating will port over your old options. We recommend you perform a backup of your site before updating. Now you can configure just about any aspect of WordPress updates.
3
  Tags: updates manager, easy updates manager, disable updates manager, disable updates, update control, plugin updates, theme updates, core updates, automatic updates, multisite
4
  Requires at least: 4.3
5
  Tested up to: 4.5
6
+ Stable tag: 5.4.5
7
  License: GPLv2 or later
8
 
9
  Manage all your WordPress updates, including individual plugin/theme updates, automatic updates, and loads more. Also works with WordPress Multisite.
94
 
95
  == Changelog ==
96
 
97
+ = 5.4.5 =
98
+ Released 2016-04-29
99
+
100
+ * Bug fix: Resolving PHP error notices in dashboard
101
+ * Numerous dashboard improvements and a spinner to show save progress
102
+ * Fixing bug in Multisite where the same user is showing up multiple times
103
+
104
  = 5.4.3 =
105
  Released 2016-01-15
106
 
178
 
179
  == Upgrade Notice ==
180
 
181
+ = 5.4.5 =
182
+ Dashboard improvements and multisite fixes
183
+
184
  = 5.4.3 =
185
  CSS and JS enhancements for the main dashboard tab
186
 
212
  Only upgrade if using WordPress 4.3. Many changes to ensure WordPress 4.3 compatibility.
213
 
214
  = 5.0.0 =
215
+ Major plugin rewrite and update. Updating will port over your old options. We recommend you perform a backup of your site before updating. Now you can configure just about any aspect of WordPress updates.