Widget CSS Classes - Version 1.5.4

Version Description

  • Compatibility: Fix for old single widgets (remove notice). #37 (props @westonruter)
  • Tested with WP 5.2.
Download this release

Release Info

Developer keraweb
Plugin Icon 128x128 Widget CSS Classes
Version 1.5.4
Comparing to
See all releases

Code changes from version 1.5.3 to 1.5.4

includes/widget-css-classes.class.php CHANGED
@@ -5,7 +5,7 @@
5
  * Loader
6
  * @author C.M. Kendrick <cindy@cleverness.org>
7
  * @package widget-css-classes
8
- * @version 1.5.3
9
  */
10
 
11
  /**
@@ -465,8 +465,14 @@ class WCSSC {
465
  $this_id = $params[0]['id']; // Get the id for the current sidebar we're processing
466
  $widget_id = $params[0]['widget_id'];
467
  $widget_obj = $wp_registered_widgets[ $widget_id ];
468
- $widget_num = $widget_obj['params'][0]['number'];
469
- $widget_opt = self::get_widget_opt( $widget_obj );
 
 
 
 
 
 
470
 
471
  // If set, try to fix invalid sidebar parameters.
472
  if ( WCSSC_Lib::get_settings( 'fix_widget_params' ) ) {
5
  * Loader
6
  * @author C.M. Kendrick <cindy@cleverness.org>
7
  * @package widget-css-classes
8
+ * @version 1.5.4
9
  */
10
 
11
  /**
465
  $this_id = $params[0]['id']; // Get the id for the current sidebar we're processing
466
  $widget_id = $params[0]['widget_id'];
467
  $widget_obj = $wp_registered_widgets[ $widget_id ];
468
+
469
+ // Skip old single widget (not using WP_Widget).
470
+ if ( ! isset( $widget_obj['params'][0]['number'] ) ) {
471
+ return $params;
472
+ }
473
+
474
+ $widget_num = $widget_obj['params'][0]['number'];
475
+ $widget_opt = self::get_widget_opt( $widget_obj );
476
 
477
  // If set, try to fix invalid sidebar parameters.
478
  if ( WCSSC_Lib::get_settings( 'fix_widget_params' ) ) {
readme.txt CHANGED
@@ -1,4 +1,4 @@
1
- === Widget CSS Classes ===
2
  Contributors: elusivelight, keraweb
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=cindy@cleverness.org
4
  Author URI: http://cleverness.org
@@ -7,9 +7,9 @@ Tags: widgets, classes, css, widget classes, widget css
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
  Requires at least: 3.3
10
- Tested up to: 5.0
11
  Requires PHP: 5.2.4
12
- Stable tag: 1.5.3
13
 
14
  Add custom classes and ids plus first, last, even, odd, and numbered classes to your widgets.
15
 
@@ -96,12 +96,16 @@ Please file a [bug report on GitHub](https://github.com/cleverness/widget-css-cl
96
 
97
  == Changelog ==
98
 
 
 
 
 
99
  = 1.5.3 =
100
- * **Compatibility:** dFactory Responsive Lightbox widget option. #33
101
  * Tested with WP 5.0.
102
 
103
  = 1.5.2.1 =
104
- * **i18n:** Remove sv_SE translation from the plugin directory. It's 95% on translate.wordpress.org and accepted as the better version. [#23](https://github.com/cleverness/widget-css-classes/issues/23)
105
  * **Documentation:** Readme & Wiki. [#31](https://github.com/cleverness/widget-css-classes/issues/31)
106
  * **Compatibility:** Tested with WordPress 4.9
107
 
1
+ === Widget CSS Classes ===
2
  Contributors: elusivelight, keraweb
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=cindy@cleverness.org
4
  Author URI: http://cleverness.org
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
  Requires at least: 3.3
10
+ Tested up to: 5.2
11
  Requires PHP: 5.2.4
12
+ Stable tag: 1.5.4
13
 
14
  Add custom classes and ids plus first, last, even, odd, and numbered classes to your widgets.
15
 
96
 
97
  == Changelog ==
98
 
99
+ = 1.5.4 =
100
+ * **Compatibility:** Fix for old single widgets (remove notice). [#37](https://github.com/cleverness/widget-css-classes/issues/37) (props @westonruter)
101
+ * Tested with WP 5.2.
102
+
103
  = 1.5.3 =
104
+ * **Compatibility:** dFactory Responsive Lightbox widget option. [#33](https://github.com/cleverness/widget-css-classes/issues/33)
105
  * Tested with WP 5.0.
106
 
107
  = 1.5.2.1 =
108
+ * **i18n:** Remove sv_SE translation from the plugin directory. It's 95% on translate.wordpress.org and accepted as the better version. [#23](https://github.com/cleverness/widget-css-classes/issues/23)
109
  * **Documentation:** Readme & Wiki. [#31](https://github.com/cleverness/widget-css-classes/issues/31)
110
  * **Compatibility:** Tested with WordPress 4.9
111
 
widget-css-classes.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  * Plugin Name: Widget CSS Classes
4
- * Version: 1.5.3
5
  * Description: Add custom, first, last, even, odd, and numbered classes to your widgets.
6
  * Author: C.M. Kendrick
7
  * Author URI: http://cleverness.org
@@ -27,7 +27,7 @@ function widget_css_classes_loader() {
27
 
28
  if ( is_admin() ) {
29
 
30
- if ( ! defined( 'WCSSC_PLUGIN_VERSION' ) ) define( 'WCSSC_PLUGIN_VERSION', '1.5.3' );
31
  if ( ! defined( 'WCSSC_FILE' ) ) define( 'WCSSC_FILE', __FILE__ );
32
  if ( ! defined( 'WCSSC_BASENAME' ) ) define( 'WCSSC_BASENAME', plugin_basename( __FILE__ ) );
33
  if ( ! defined( 'WCSSC_PLUGIN_DIR' ) ) define( 'WCSSC_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
@@ -67,7 +67,7 @@ function widget_css_classes_activation() {
67
  }
68
 
69
  if ( ! defined( 'WCSSC_BASENAME' ) ) define( 'WCSSC_BASENAME', plugin_basename( __FILE__ ) );
70
- if ( ! defined( 'WCSSC_DB_VERSION' ) ) define( 'WCSSC_DB_VERSION', '1.5.3' );
71
  if ( ! defined( 'WCSSC_FILE' ) ) define( 'WCSSC_FILE', __FILE__ );
72
  include_once 'includes/widget-css-classes-library.class.php';
73
 
1
  <?php
2
  /**
3
  * Plugin Name: Widget CSS Classes
4
+ * Version: 1.5.4
5
  * Description: Add custom, first, last, even, odd, and numbered classes to your widgets.
6
  * Author: C.M. Kendrick
7
  * Author URI: http://cleverness.org
27
 
28
  if ( is_admin() ) {
29
 
30
+ if ( ! defined( 'WCSSC_PLUGIN_VERSION' ) ) define( 'WCSSC_PLUGIN_VERSION', '1.5.4' );
31
  if ( ! defined( 'WCSSC_FILE' ) ) define( 'WCSSC_FILE', __FILE__ );
32
  if ( ! defined( 'WCSSC_BASENAME' ) ) define( 'WCSSC_BASENAME', plugin_basename( __FILE__ ) );
33
  if ( ! defined( 'WCSSC_PLUGIN_DIR' ) ) define( 'WCSSC_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
67
  }
68
 
69
  if ( ! defined( 'WCSSC_BASENAME' ) ) define( 'WCSSC_BASENAME', plugin_basename( __FILE__ ) );
70
+ if ( ! defined( 'WCSSC_DB_VERSION' ) ) define( 'WCSSC_DB_VERSION', '1.5.4' );
71
  if ( ! defined( 'WCSSC_FILE' ) ) define( 'WCSSC_FILE', __FILE__ );
72
  include_once 'includes/widget-css-classes-library.class.php';
73