Widget CSS Classes - Version 1.2

Version Description

  • Replace ID with custom ID rather than appending to existing ID
  • Added settings to not show numbered widget classes, first/last classes, and even/odd classes
Download this release

Release Info

Developer elusivelight
Plugin Icon 128x128 Widget CSS Classes
Version 1.2
Comparing to
See all releases

Code changes from version 1.1 to 1.2

includes/widget-css-classes-library.class.php CHANGED
@@ -84,6 +84,9 @@ class WCSSC_Lib {
84
  'show_id' => 0,
85
  'type' => 1,
86
  'dropdown' => '',
 
 
 
87
  );
88
 
89
  add_option( 'WCSSC_options', $options );
@@ -91,12 +94,13 @@ class WCSSC_Lib {
91
 
92
  } else {
93
 
94
- /*if ( $version < 1.1 ) {
95
- $general_options = get_option( 'WCSSC_general' );
96
- $general_options['field'] = 0;
97
- update_option( 'WCSSC_general', $general_options );
98
- }*/
99
-
 
100
  }
101
  }
102
 
84
  'show_id' => 0,
85
  'type' => 1,
86
  'dropdown' => '',
87
+ 'show_number' => 1,
88
+ 'show_location' => 1,
89
+ 'show_evenodd' => 1,
90
  );
91
 
92
  add_option( 'WCSSC_options', $options );
94
 
95
  } else {
96
 
97
+ if ( $version < 1.2 ) {
98
+ $general_options = get_option( 'WCSSC_options' );
99
+ $general_options['show_number'] = 1;
100
+ $general_options['show_location'] = 1;
101
+ $general_options['show_evenodd'] = 1;
102
+ update_option( 'WCSSC_options', $general_options );
103
+ }
104
  }
105
  }
106
 
includes/widget-css-classes-settings.class.php CHANGED
@@ -40,12 +40,35 @@ class WCSSC_Settings {
40
 
41
  register_setting( $this->general_key, $this->general_key, array( $this, 'validate_input' ) );
42
  add_settings_section( 'section_general', esc_attr__( 'Widget CSS Classes Settings', 'widget-css-classes' ), array( $this, 'section_general_desc' ), $this->general_key );
 
 
 
43
  add_settings_field( 'show_id', esc_attr__( 'Show Additional Field for ID', 'widget-css-classes' ), array( $this, 'show_id_option' ), $this->general_key, 'section_general' );
44
  add_settings_field( 'type', esc_attr__( 'Class Field Type', 'widget-css-classes' ), array( $this, 'type_option' ), $this->general_key, 'section_general' );
45
  add_settings_field( 'dropdown', esc_attr__( 'Define Classes for Dropdown', 'widget-css-classes' ), array( $this, 'dropdown_option' ), $this->general_key, 'section_general' );
46
  do_action( 'widget_css_classes_settings' );
47
  }
48
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49
  function show_id_option() {
50
  ?>
51
  <input type="radio" name="<?php echo $this->general_key.'[show_id]'; ?>" value="1" <?php checked( $this->general_settings['show_id'], 1 ); ?> /> <?php esc_attr_e( 'Yes', 'widget-css-classes' ); ?>&nbsp;&nbsp;
40
 
41
  register_setting( $this->general_key, $this->general_key, array( $this, 'validate_input' ) );
42
  add_settings_section( 'section_general', esc_attr__( 'Widget CSS Classes Settings', 'widget-css-classes' ), array( $this, 'section_general_desc' ), $this->general_key );
43
+ add_settings_field( 'show_number', esc_attr__( 'Add Widget Number Classes', 'widget-css-classes' ), array( $this, 'show_number_option' ), $this->general_key, 'section_general' );
44
+ add_settings_field( 'show_location', esc_attr__( 'Add First/Last Classes', 'widget-css-classes' ), array( $this, 'show_location_option' ), $this->general_key, 'section_general' );
45
+ add_settings_field( 'show_evenodd', esc_attr__( 'Add Even/Odd Classes', 'widget-css-classes' ), array( $this, 'show_evenodd_option' ), $this->general_key, 'section_general' );
46
  add_settings_field( 'show_id', esc_attr__( 'Show Additional Field for ID', 'widget-css-classes' ), array( $this, 'show_id_option' ), $this->general_key, 'section_general' );
47
  add_settings_field( 'type', esc_attr__( 'Class Field Type', 'widget-css-classes' ), array( $this, 'type_option' ), $this->general_key, 'section_general' );
48
  add_settings_field( 'dropdown', esc_attr__( 'Define Classes for Dropdown', 'widget-css-classes' ), array( $this, 'dropdown_option' ), $this->general_key, 'section_general' );
49
  do_action( 'widget_css_classes_settings' );
50
  }
51
 
52
+ function show_number_option() { ?>
53
+ <input type="radio" name="<?php echo $this->general_key.'[show_number]'; ?>" value="1" <?php checked( $this->general_settings['show_number'], 1 ); ?> /> <?php esc_attr_e( 'Yes', 'widget-css-classes' ); ?>&nbsp;&nbsp;
54
+ <input type="radio" name="<?php echo $this->general_key.'[show_number]'; ?>" value="0" <?php checked( $this->general_settings['show_number'], 0 ); ?> /> <?php esc_attr_e( 'No', 'widget-css-classes' ); ?>
55
+ <?php
56
+ }
57
+
58
+ function show_location_option() {
59
+ ?>
60
+ <input type="radio" name="<?php echo $this->general_key.'[show_location]'; ?>" value="1" <?php checked( $this->general_settings['show_location'], 1 ); ?> /> <?php esc_attr_e( 'Yes', 'widget-css-classes' ); ?>&nbsp;&nbsp;
61
+ <input type="radio" name="<?php echo $this->general_key.'[show_location]'; ?>" value="0" <?php checked( $this->general_settings['show_location'], 0 ); ?> /> <?php esc_attr_e( 'No', 'widget-css-classes' ); ?>
62
+ <?php
63
+ }
64
+
65
+ function show_evenodd_option() {
66
+ ?>
67
+ <input type="radio" name="<?php echo $this->general_key.'[show_evenodd]'; ?>" value="1" <?php checked( $this->general_settings['show_evenodd'], 1 ); ?> /> <?php esc_attr_e( 'Yes', 'widget-css-classes' ); ?>&nbsp;&nbsp;
68
+ <input type="radio" name="<?php echo $this->general_key.'[show_evenodd]'; ?>" value="0" <?php checked( $this->general_settings['show_evenodd'], 0 ); ?> /> <?php esc_attr_e( 'No', 'widget-css-classes' ); ?>
69
+ <?php
70
+ }
71
+
72
  function show_id_option() {
73
  ?>
74
  <input type="radio" name="<?php echo $this->general_key.'[show_id]'; ?>" value="1" <?php checked( $this->general_settings['show_id'], 1 ); ?> /> <?php esc_attr_e( 'Yes', 'widget-css-classes' ); ?>&nbsp;&nbsp;
includes/widget-css-classes.class.php CHANGED
@@ -45,7 +45,7 @@ class WCSSC {
45
  if ( WCSSC_Loader::$settings['type'] == 2 ) {
46
  $preset_values = explode( ';', WCSSC_Loader::$settings['dropdown'] );
47
  $fields .= "\t<label for='widget-{$widget->id_base}-{$widget->number}-classes'>".apply_filters( 'widget_css_classes_class', esc_html__( 'CSS Class', 'widget-css-classes' ) ).":</label>\n";
48
- $fields .= "\t<select name='widget-{$widget->id_base}[{$widget->number}][classes]' id='widget-{$widget->id_base}-{$widget->number}-classes'>\n";
49
  $fields .= "\t<option value=''>".esc_attr__( 'Select', 'widget-css-classes' )."</option>\n";
50
  foreach ( $preset_values as $preset ) {
51
  if ( $preset != '' ) {
@@ -98,7 +98,7 @@ class WCSSC {
98
  // if Widget Logic plugin is enabled, use it's callback
99
  if ( in_array( 'widget-logic/widget_logic.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {
100
  $widget_logic_options = get_option( 'widget_logic' );
101
- if ( $widget_logic_options['widget_logic-options-filter'] == 'checked' ) {
102
  $widget_opt = get_option( $widget_obj['callback_wl_redirect'][0]->option_name );
103
  } else {
104
  $widget_opt = get_option( $widget_obj['callback'][0]->option_name );
@@ -122,41 +122,51 @@ class WCSSC {
122
  // add id
123
  if ( $widget_css_classes['show_id'] == 1 ) {
124
  if ( isset( $widget_opt[$widget_num]['ids'] ) && !empty( $widget_opt[$widget_num]['ids'] ) )
125
- $params[0]['before_widget'] = preg_replace( '/id="/', "id=\"{$widget_opt[$widget_num]['ids']} ", $params[0]['before_widget'], 1 );
126
  }
127
 
128
  // add first, last, even, and odd classes
129
- if ( !$widget_number ) {
130
- $widget_number = array();
131
- }
 
132
 
133
- if ( !isset( $arr_registered_widgets[$this_id] ) || !is_array( $arr_registered_widgets[$this_id] ) ) {
134
- return $params;
135
- }
136
 
137
- if ( isset( $widget_number[$this_id] ) ) {
138
- $widget_number[$this_id]++;
139
- } else {
140
- $widget_number[$this_id] = 1;
141
- }
142
 
143
- $class = 'class="'.apply_filters( 'widget_css_classes_number', esc_attr__( 'widget-', 'widget-css-classes' ) ).$widget_number[$this_id].' ';
144
- $widget_first = apply_filters( 'widget_css_classes_first', esc_attr__( 'widget-first', 'widget-css-classes' ) );
145
- $widget_last = apply_filters( 'widget_css_classes_last', esc_attr__( 'widget-last', 'widget-css-classes' ) );
146
- $widget_even = apply_filters( 'widget_css_classes_even', esc_attr__( 'widget-even', 'widget-css-classes' ) );
147
- $widget_odd = apply_filters( 'widget_css_classes_odd', esc_attr__( 'widget-odd', 'widget-css-classes' ) );
148
 
149
- if ( $widget_number[$this_id] == 1 ) {
150
- $class .= $widget_first.' '.$widget_odd.' ';
151
- } else {
152
- $class .= ( ( $widget_number[$this_id] % 2 ) ? $widget_odd.' ' : $widget_even.' ' );
153
- }
154
 
155
- if ( $widget_number[$this_id] == count( $arr_registered_widgets[$this_id] ) ) {
156
- $class .= $widget_last.' ';
157
- }
 
 
 
 
 
 
 
158
 
159
- $params[0]['before_widget'] = str_replace( 'class="', $class, $params[0]['before_widget'] );
 
 
 
 
 
 
 
 
160
 
161
  do_action( 'widget_css_classes_add_classes', $params, $widget_id, $widget_number, $widget_opt, $widget_obj );
162
 
45
  if ( WCSSC_Loader::$settings['type'] == 2 ) {
46
  $preset_values = explode( ';', WCSSC_Loader::$settings['dropdown'] );
47
  $fields .= "\t<label for='widget-{$widget->id_base}-{$widget->number}-classes'>".apply_filters( 'widget_css_classes_class', esc_html__( 'CSS Class', 'widget-css-classes' ) ).":</label>\n";
48
+ $fields .= "\t<select name='widget-{$widget->id_base}[{$widget->number}][classes]' id='widget-{$widget->id_base}-{$widget->number}-classes'>\n";
49
  $fields .= "\t<option value=''>".esc_attr__( 'Select', 'widget-css-classes' )."</option>\n";
50
  foreach ( $preset_values as $preset ) {
51
  if ( $preset != '' ) {
98
  // if Widget Logic plugin is enabled, use it's callback
99
  if ( in_array( 'widget-logic/widget_logic.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {
100
  $widget_logic_options = get_option( 'widget_logic' );
101
+ if ( 'checked' == $widget_logic_options['widget_logic-options-filter'] ) {
102
  $widget_opt = get_option( $widget_obj['callback_wl_redirect'][0]->option_name );
103
  } else {
104
  $widget_opt = get_option( $widget_obj['callback'][0]->option_name );
122
  // add id
123
  if ( $widget_css_classes['show_id'] == 1 ) {
124
  if ( isset( $widget_opt[$widget_num]['ids'] ) && !empty( $widget_opt[$widget_num]['ids'] ) )
125
+ $params[0]['before_widget'] = preg_replace( '/id="[^"]*/', "id=\"{$widget_opt[$widget_num]['ids']}", $params[0]['before_widget'], 1 );
126
  }
127
 
128
  // add first, last, even, and odd classes
129
+ if ( $widget_css_classes['show_number'] == 1 || $widget_css_classes['show_location'] == 1 || $widget_css_classes['show_evenodd'] == 1 ) {
130
+ if ( !$widget_number ) {
131
+ $widget_number = array();
132
+ }
133
 
134
+ if ( !isset( $arr_registered_widgets[$this_id] ) || !is_array( $arr_registered_widgets[$this_id] ) ) {
135
+ return $params;
136
+ }
137
 
138
+ if ( isset( $widget_number[$this_id] ) ) {
139
+ $widget_number[$this_id]++;
140
+ } else {
141
+ $widget_number[$this_id] = 1;
142
+ }
143
 
144
+ $class = 'class="';
 
 
 
 
145
 
146
+ if ( $widget_css_classes['show_number'] == 1 ) {
147
+ $class .= apply_filters( 'widget_css_classes_number', esc_attr__( 'widget-', 'widget-css-classes' ) ).$widget_number[$this_id].' ';
148
+ }
 
 
149
 
150
+ if ( $widget_css_classes['show_location'] == 1 ) {
151
+ $widget_first = apply_filters( 'widget_css_classes_first', esc_attr__( 'widget-first', 'widget-css-classes' ) );
152
+ $widget_last = apply_filters( 'widget_css_classes_last', esc_attr__( 'widget-last', 'widget-css-classes' ) );
153
+ if ( $widget_number[$this_id] == 1 ) {
154
+ $class .= $widget_first.' ';
155
+ }
156
+ if ( $widget_number[$this_id] == count( $arr_registered_widgets[$this_id] ) ) {
157
+ $class .= $widget_last.' ';
158
+ }
159
+ }
160
 
161
+ if ( $widget_css_classes['show_evenodd'] == 1 ) {
162
+ $widget_even = apply_filters( 'widget_css_classes_even', esc_attr__( 'widget-even', 'widget-css-classes' ) );
163
+ $widget_odd = apply_filters( 'widget_css_classes_odd', esc_attr__( 'widget-odd', 'widget-css-classes' ) );
164
+ $class .= ( ( $widget_number[$this_id] % 2 ) ? $widget_odd.' ' : $widget_even.' ' );
165
+ }
166
+
167
+ $params[0]['before_widget'] = str_replace( 'class="', $class, $params[0]['before_widget'] );
168
+
169
+ }
170
 
171
  do_action( 'widget_css_classes_add_classes', $params, $widget_id, $widget_number, $widget_opt, $widget_obj );
172
 
languages/widget-css-classes.mo CHANGED
Binary file
languages/widget-css-classes.pot CHANGED
@@ -2,8 +2,8 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Widget CSS Classes\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2012-10-10 12:53-0500\n"
6
- "PO-Revision-Date: 2012-10-10 12:53-0500\n"
7
  "Last-Translator: C.M. Kendrick <cindy@cleverness.org>\n"
8
  "Language-Team: <cindy@cleverness.org>\n"
9
  "MIME-Version: 1.0\n"
@@ -11,11 +11,14 @@ msgstr ""
11
  "Content-Transfer-Encoding: 8bit\n"
12
  "X-Poedit-KeywordsList: _;_e;esc_attr__;esc_attr_e;esc_html__;esc_html_e\n"
13
  "X-Poedit-Basepath: ./\n"
 
14
  "X-Poedit-SearchPath-0: ..\n"
15
 
16
  #: ../widget-css-classes.php:54
17
  #: ../includes/widget-css-classes-loader.class.php:40
18
- msgid "Widget CSS Classes requires WordPress 3.3 or newer. <a href=\"http://codex.wordpress.org/Upgrading_WordPress\">Please update.</a>"
 
 
19
  msgstr ""
20
 
21
  #: ../includes/widget-css-classes-library.class.php:31
@@ -36,66 +39,84 @@ msgid "Widget CSS Classes Settings"
36
  msgstr ""
37
 
38
  #: ../includes/widget-css-classes-settings.class.php:43
39
- msgid "Show Additional Field for ID"
40
  msgstr ""
41
 
42
  #: ../includes/widget-css-classes-settings.class.php:44
43
- msgid "Class Field Type"
44
  msgstr ""
45
 
46
  #: ../includes/widget-css-classes-settings.class.php:45
 
 
 
 
 
 
 
 
 
 
 
 
47
  msgid "Define Classes for Dropdown"
48
  msgstr ""
49
 
50
- #: ../includes/widget-css-classes-settings.class.php:51
 
 
 
51
  msgid "Yes"
52
  msgstr ""
53
 
54
- #: ../includes/widget-css-classes-settings.class.php:52
 
 
 
55
  msgid "No"
56
  msgstr ""
57
 
58
- #: ../includes/widget-css-classes-settings.class.php:58
59
  msgid "Text"
60
  msgstr ""
61
 
62
- #: ../includes/widget-css-classes-settings.class.php:59
63
  msgid "Dropdown"
64
  msgstr ""
65
 
66
- #: ../includes/widget-css-classes-settings.class.php:60
67
  msgid "Hide"
68
  msgstr ""
69
 
70
- #: ../includes/widget-css-classes-settings.class.php:92
71
  msgid "Import/Export"
72
  msgstr ""
73
 
74
- #: ../includes/widget-css-classes-settings.class.php:97
75
  msgid "Settings Imported"
76
  msgstr ""
77
 
78
- #: ../includes/widget-css-classes-settings.class.php:100
79
  msgid "Invalid Settings File"
80
  msgstr ""
81
 
82
- #: ../includes/widget-css-classes-settings.class.php:103
83
  msgid "No Settings File Selected"
84
  msgstr ""
85
 
86
- #: ../includes/widget-css-classes-settings.class.php:174
87
  msgid "Widget CSS Classes"
88
  msgstr ""
89
 
90
- #: ../includes/widget-css-classes-settings.class.php:220
91
  msgid "Import/Export Settings"
92
  msgstr ""
93
 
94
- #: ../includes/widget-css-classes-settings.class.php:222
95
  msgid "Export Settings"
96
  msgstr ""
97
 
98
- #: ../includes/widget-css-classes-settings.class.php:226
99
  msgid "Import Settings"
100
  msgstr ""
101
 
@@ -112,23 +133,22 @@ msgstr ""
112
  msgid "Select"
113
  msgstr ""
114
 
115
- #: ../includes/widget-css-classes.class.php:143
116
  msgid "widget-"
117
  msgstr ""
118
 
119
- #: ../includes/widget-css-classes.class.php:144
120
  msgid "widget-first"
121
  msgstr ""
122
 
123
- #: ../includes/widget-css-classes.class.php:145
124
  msgid "widget-last"
125
  msgstr ""
126
 
127
- #: ../includes/widget-css-classes.class.php:146
128
  msgid "widget-even"
129
  msgstr ""
130
 
131
- #: ../includes/widget-css-classes.class.php:147
132
  msgid "widget-odd"
133
  msgstr ""
134
-
2
  msgstr ""
3
  "Project-Id-Version: Widget CSS Classes\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2012-12-02 15:50-0500\n"
6
+ "PO-Revision-Date: 2012-12-02 15:50-0500\n"
7
  "Last-Translator: C.M. Kendrick <cindy@cleverness.org>\n"
8
  "Language-Team: <cindy@cleverness.org>\n"
9
  "MIME-Version: 1.0\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
  "X-Poedit-KeywordsList: _;_e;esc_attr__;esc_attr_e;esc_html__;esc_html_e\n"
13
  "X-Poedit-Basepath: ./\n"
14
+ "X-Generator: Poedit 1.5.4\n"
15
  "X-Poedit-SearchPath-0: ..\n"
16
 
17
  #: ../widget-css-classes.php:54
18
  #: ../includes/widget-css-classes-loader.class.php:40
19
+ msgid ""
20
+ "Widget CSS Classes requires WordPress 3.3 or newer. <a href=\"http://codex."
21
+ "wordpress.org/Upgrading_WordPress\">Please update.</a>"
22
  msgstr ""
23
 
24
  #: ../includes/widget-css-classes-library.class.php:31
39
  msgstr ""
40
 
41
  #: ../includes/widget-css-classes-settings.class.php:43
42
+ msgid "Add Widget Number Classes"
43
  msgstr ""
44
 
45
  #: ../includes/widget-css-classes-settings.class.php:44
46
+ msgid "Add First/Last Classes"
47
  msgstr ""
48
 
49
  #: ../includes/widget-css-classes-settings.class.php:45
50
+ msgid "Add Even/Odd Classes"
51
+ msgstr ""
52
+
53
+ #: ../includes/widget-css-classes-settings.class.php:46
54
+ msgid "Show Additional Field for ID"
55
+ msgstr ""
56
+
57
+ #: ../includes/widget-css-classes-settings.class.php:47
58
+ msgid "Class Field Type"
59
+ msgstr ""
60
+
61
+ #: ../includes/widget-css-classes-settings.class.php:48
62
  msgid "Define Classes for Dropdown"
63
  msgstr ""
64
 
65
+ #: ../includes/widget-css-classes-settings.class.php:53
66
+ #: ../includes/widget-css-classes-settings.class.php:60
67
+ #: ../includes/widget-css-classes-settings.class.php:67
68
+ #: ../includes/widget-css-classes-settings.class.php:74
69
  msgid "Yes"
70
  msgstr ""
71
 
72
+ #: ../includes/widget-css-classes-settings.class.php:54
73
+ #: ../includes/widget-css-classes-settings.class.php:61
74
+ #: ../includes/widget-css-classes-settings.class.php:68
75
+ #: ../includes/widget-css-classes-settings.class.php:75
76
  msgid "No"
77
  msgstr ""
78
 
79
+ #: ../includes/widget-css-classes-settings.class.php:81
80
  msgid "Text"
81
  msgstr ""
82
 
83
+ #: ../includes/widget-css-classes-settings.class.php:82
84
  msgid "Dropdown"
85
  msgstr ""
86
 
87
+ #: ../includes/widget-css-classes-settings.class.php:83
88
  msgid "Hide"
89
  msgstr ""
90
 
91
+ #: ../includes/widget-css-classes-settings.class.php:115
92
  msgid "Import/Export"
93
  msgstr ""
94
 
95
+ #: ../includes/widget-css-classes-settings.class.php:120
96
  msgid "Settings Imported"
97
  msgstr ""
98
 
99
+ #: ../includes/widget-css-classes-settings.class.php:123
100
  msgid "Invalid Settings File"
101
  msgstr ""
102
 
103
+ #: ../includes/widget-css-classes-settings.class.php:126
104
  msgid "No Settings File Selected"
105
  msgstr ""
106
 
107
+ #: ../includes/widget-css-classes-settings.class.php:197
108
  msgid "Widget CSS Classes"
109
  msgstr ""
110
 
111
+ #: ../includes/widget-css-classes-settings.class.php:243
112
  msgid "Import/Export Settings"
113
  msgstr ""
114
 
115
+ #: ../includes/widget-css-classes-settings.class.php:245
116
  msgid "Export Settings"
117
  msgstr ""
118
 
119
+ #: ../includes/widget-css-classes-settings.class.php:249
120
  msgid "Import Settings"
121
  msgstr ""
122
 
133
  msgid "Select"
134
  msgstr ""
135
 
136
+ #: ../includes/widget-css-classes.class.php:147
137
  msgid "widget-"
138
  msgstr ""
139
 
140
+ #: ../includes/widget-css-classes.class.php:151
141
  msgid "widget-first"
142
  msgstr ""
143
 
144
+ #: ../includes/widget-css-classes.class.php:152
145
  msgid "widget-last"
146
  msgstr ""
147
 
148
+ #: ../includes/widget-css-classes.class.php:162
149
  msgid "widget-even"
150
  msgstr ""
151
 
152
+ #: ../includes/widget-css-classes.class.php:163
153
  msgid "widget-odd"
154
  msgstr ""
 
readme.txt CHANGED
@@ -7,8 +7,8 @@ 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: 3.4.2
11
- Stable tag: 1.1
12
 
13
  Add custom classes and ids plus first, last, even, odd, and numbered classes to your widgets.
14
 
@@ -81,6 +81,10 @@ Visit [the plugin website](http://cleverness.org/plugins/widget-css-classes/) an
81
 
82
  == Changelog ==
83
 
 
 
 
 
84
  = 1.1 =
85
  * Added support for Widget Context plugin
86
  * Fixed notices appearing when Widget Logic plugin was enabled but filter was disabled
@@ -93,6 +97,9 @@ Visit [the plugin website](http://cleverness.org/plugins/widget-css-classes/) an
93
 
94
  == Upgrade Notice ==
95
 
 
 
 
96
  = 1.1 =
97
  Compatibility fix, bug fix, new feature
98
 
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: 3.5
11
+ Stable tag: 1.2
12
 
13
  Add custom classes and ids plus first, last, even, odd, and numbered classes to your widgets.
14
 
81
 
82
  == Changelog ==
83
 
84
+ = 1.2 =
85
+ * Replace ID with custom ID rather than appending to existing ID
86
+ * Added settings to not show numbered widget classes, first/last classes, and even/odd classes
87
+
88
  = 1.1 =
89
  * Added support for Widget Context plugin
90
  * Fixed notices appearing when Widget Logic plugin was enabled but filter was disabled
97
 
98
  == Upgrade Notice ==
99
 
100
+ = 1.2 =
101
+ New settings, bug fix
102
+
103
  = 1.1 =
104
  Compatibility fix, bug fix, new feature
105
 
screenshot-3.jpg DELETED
Binary file
screenshot-3.png ADDED
Binary file
widget-css-classes.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /*
3
  Plugin Name: Widget CSS Classes
4
- Version: 1.1
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
@@ -22,7 +22,7 @@ function widget_css_classes_loader() {
22
 
23
  if ( is_admin() ) {
24
 
25
- if ( !defined( 'WCSSC_PLUGIN_VERSION' ) ) define( 'WCSSC_PLUGIN_VERSION', '1.0' );
26
  if ( !defined( 'WCSSC_FILE' ) ) define( 'WCSSC_FILE', __FILE__ );
27
  if ( !defined( 'WCSSC_BASENAME' ) ) define( 'WCSSC_BASENAME', plugin_basename( __FILE__ ) );
28
  if ( !defined( 'WCSSC_PLUGIN_DIR' ) ) define( 'WCSSC_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
@@ -56,7 +56,7 @@ function widget_css_classes_activation() {
56
  exit( $exit_msg );
57
  }
58
 
59
- if ( !defined( 'WCSSC_DB_VERSION' ) ) define( 'WCSSC_DB_VERSION', '1.0' );
60
  if ( !defined( 'WCSSC_FILE' ) ) define( 'WCSSC_FILE', __FILE__ );
61
  include_once 'includes/widget-css-classes-library.class.php';
62
 
1
  <?php
2
  /*
3
  Plugin Name: Widget CSS Classes
4
+ Version: 1.2
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
22
 
23
  if ( is_admin() ) {
24
 
25
+ if ( !defined( 'WCSSC_PLUGIN_VERSION' ) ) define( 'WCSSC_PLUGIN_VERSION', '1.2' );
26
  if ( !defined( 'WCSSC_FILE' ) ) define( 'WCSSC_FILE', __FILE__ );
27
  if ( !defined( 'WCSSC_BASENAME' ) ) define( 'WCSSC_BASENAME', plugin_basename( __FILE__ ) );
28
  if ( !defined( 'WCSSC_PLUGIN_DIR' ) ) define( 'WCSSC_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
56
  exit( $exit_msg );
57
  }
58
 
59
+ if ( !defined( 'WCSSC_DB_VERSION' ) ) define( 'WCSSC_DB_VERSION', '1.2' );
60
  if ( !defined( 'WCSSC_FILE' ) ) define( 'WCSSC_FILE', __FILE__ );
61
  include_once 'includes/widget-css-classes-library.class.php';
62