Styles - Version 0.5.1.1

Version Description

  • Fix transparent background option
  • Fix display of unavailable theme options
Download this release

Release Info

Developer brainstormmedia
Plugin Icon Styles
Version 0.5.1.1
Comparing to
See all releases

Code changes from version 0.5.1 to 0.5.1.1

classes/storm-css-processor.php CHANGED
@@ -124,8 +124,13 @@ class Storm_CSS_Processor {
124
 
125
  // Organize variables IDs into groups
126
  $styles->groups[$group][] = $id;
 
 
 
127
  }
128
  }
 
 
129
 
130
  // Remove properties
131
  $styles->css->contents = $this->helper->remove_properties( 'value', $styles->css->contents );
@@ -194,7 +199,7 @@ class Storm_CSS_Processor {
194
  break;
195
  case 'transparent':
196
 
197
- $properties .= 'transparent url();' ;
198
 
199
  break;
200
  case 'hide':
124
 
125
  // Organize variables IDs into groups
126
  $styles->groups[$group][] = $id;
127
+
128
+ // Debug: Groups & Labels
129
+ // $_groups[$group][] = $label;
130
  }
131
  }
132
+ // Debug: Groups & Labels
133
+ // echo '<pre>';print_r($_groups);exit;
134
 
135
  // Remove properties
136
  $styles->css->contents = $this->helper->remove_properties( 'value', $styles->css->contents );
199
  break;
200
  case 'transparent':
201
 
202
+ $properties .= 'background:transparent url();' ;
203
 
204
  break;
205
  case 'hide':
classes/storm-styles.php CHANGED
@@ -12,7 +12,7 @@ class Storm_Styles {
12
  *
13
  * @var int
14
  **/
15
- var $version = '0.5.0';
16
 
17
  /**
18
  * Plugin DB version
12
  *
13
  * @var int
14
  **/
15
+ var $version = '0.5.1.1';
16
 
17
  /**
18
  * Plugin DB version
classes/storm-wp-admin.php CHANGED
@@ -221,6 +221,7 @@ class Storm_WP_Admin extends Storm_WP_Frontend {
221
  // Sanatize here before going to DB
222
  $values = apply_filters( 'styles_before_save_element_values', $el['values'] );
223
  $this->styles->variables[$id]['values'] = $values;
 
224
  }
225
 
226
  return $this->styles->variables; // Write to DB
221
  // Sanatize here before going to DB
222
  $values = apply_filters( 'styles_before_save_element_values', $el['values'] );
223
  $this->styles->variables[$id]['values'] = $values;
224
+ unset( $this->styles->variables[$id]['selector'] );
225
  }
226
 
227
  return $this->styles->variables; // Write to DB
classes/storm-wp-settings.php CHANGED
@@ -56,7 +56,7 @@ class Storm_WP_Settings {
56
  * Register individual settings fields
57
  */
58
  public function settings_items() {
59
-
60
  // General
61
  add_settings_field(
62
  'styles-api-key', // Unique ID
@@ -69,8 +69,7 @@ class Storm_WP_Settings {
69
 
70
  // GUI
71
  foreach( $this->styles->variables as $key => $element ){
72
-
73
- if ( empty( $element['id']) ) {
74
  // Skip items that don't exist in the current theme
75
  continue;
76
  }
56
  * Register individual settings fields
57
  */
58
  public function settings_items() {
59
+
60
  // General
61
  add_settings_field(
62
  'styles-api-key', // Unique ID
69
 
70
  // GUI
71
  foreach( $this->styles->variables as $key => $element ){
72
+ if ( empty( $element['selector']) ) {
 
73
  // Skip items that don't exist in the current theme
74
  continue;
75
  }
css/admin.scss ADDED
@@ -0,0 +1,341 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .styles-admin {
2
+
3
+ .primary { width:70%; }
4
+ .secondary { width: 20%; }
5
+
6
+ /* Gradient Picker */
7
+
8
+ .gradPicker {
9
+ width: 327px;position:relative;
10
+ .presets {
11
+ width: 500px;
12
+ display:block;
13
+ height: 32px;
14
+ margin-bottom: 6px;
15
+ li {
16
+ display:block;
17
+ width: 30px;
18
+ height: 30px;
19
+ float:left;
20
+ margin: 0 1px 1px 0;
21
+ border: 1px solid #ccc;
22
+ }
23
+ }
24
+ }
25
+ .stop-markers {
26
+ position:relative;height: 30px;
27
+ .ui-slider {
28
+ position:absolute;top:10px;left:0;height: 0px;border:none;background-image:url();
29
+ a {
30
+ background-image:url(); border: 1px solid #999;border-radius: 0 0 2px 2px;
31
+ width: 11px;
32
+ height:11px;
33
+ margin-left: -0.39em;
34
+ text-indent: -9999px;
35
+ }
36
+ a:before { /* Black arrow */
37
+ content: "<div/>";
38
+ width: 0;
39
+ height: 0;
40
+ position:absolute;
41
+ top:-7px;
42
+ left: 0px;
43
+ border-left: 6px solid transparent;
44
+ border-right: 6px solid transparent;
45
+ border-bottom: 6px solid #999;
46
+ }
47
+ a:after { /* White arrow */
48
+ content: "<div/>";
49
+ width: 0;
50
+ height: 0;
51
+ position:absolute;
52
+ top:-5px;
53
+ left:2px;
54
+ border-left: 4px solid transparent;
55
+ border-right: 4px solid transparent;
56
+ border-bottom: 4px solid #fff;
57
+ }
58
+ }
59
+ }
60
+ .grad-preview {height: 30px;display:block;border: 1px solid #ccc;}
61
+
62
+ .stop-markers, .grad-preview, .stop-markers .ui-slider {width: 100%;}
63
+
64
+ .stop-markers { cursor:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAWCAYAAADAQbwGAAAAGXRFWHRTb2Z0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8mRB6i0O9kdcjQaDdhut2yz2TC8y0RMnGFQLJlMCmr%2FGn8CDADjZb9gHU6eaQAAAABJRU5ErkJggg%3D%3D') 5 0,pointer;}
66
+
67
+ /* Background Picker */
68
+
69
+ .bgPicker {
70
+ .data {
71
+ display:none;
72
+ label {
73
+ display:block;
74
+ }
75
+ }
76
+ .types {
77
+ a {
78
+ background: url(/wp-content/plugins/styles/css/bg-sprites.png) no-repeat 3px 4px;
79
+ text-indent: -9999px;
80
+ overflow:hidden;
81
+ display:inline-block;
82
+ width: 16px;
83
+ height: 12px;
84
+ padding: 3px;
85
+ -moz-border-radius: 3px;
86
+ -khtml-border-radius: 3px;
87
+ -webkit-border-radius: 3px;
88
+ border-radius: 3px;
89
+
90
+ &.active, &:hover {
91
+ background-color: #C1E7FF;
92
+ }
93
+ }
94
+ a[data-type="gradient"] { background-position: -47px 4px; }
95
+ a[data-type="bg_color"] { background-position: -97px 4px; }
96
+ a[data-type="transparent"] { background-position: -147px 4px; }
97
+ a[data-type="hide"] { background-position: -197px 4px; }
98
+ a[data-type="font"] { background-position: -247px 4px; }
99
+ }
100
+
101
+ }
102
+
103
+ /* Image Picker */
104
+ .background-image {
105
+ display:none;
106
+ }
107
+ .pds_image {
108
+ .current {
109
+ margin-bottom: 5px;
110
+ img {
111
+ height: 80px;
112
+ }
113
+ }
114
+ .pds_image_input {
115
+ width: 60%;
116
+ }
117
+ }
118
+ .imagePreview {
119
+ max-height: 80px;
120
+ display:block;
121
+ margin: 10px;
122
+ }
123
+
124
+ /* Color Picker */
125
+
126
+ .colorPicker {
127
+ width: 20px;
128
+ height: 20px;
129
+ border: 4px solid #ccc;
130
+ border-radius: 4px;
131
+ }
132
+
133
+ .pds_color_input {
134
+ width: 20px;
135
+ font-size: 9px;
136
+ text-transform:uppercase;
137
+ }
138
+
139
+ .ui {
140
+ table.jPicker {
141
+ background: transparent;
142
+ border: 0px none transparent;
143
+ }
144
+ }
145
+
146
+
147
+ /* Font Picker */
148
+
149
+ .font {
150
+ display:none;
151
+ }
152
+
153
+ .pds_font_select {
154
+ option {
155
+ text-indent: 10px;
156
+ }
157
+ option.label {
158
+ font-family: Helvetica, Arial, sans-serif;
159
+ font-size: 11px;
160
+ color: #666;
161
+ font-style: normal;
162
+ font-weight: normal;
163
+ text-indent: 0;
164
+ margin-top:10px;
165
+ }
166
+ option.first {
167
+ margin-top:0;
168
+ }
169
+
170
+ }
171
+
172
+ .value-toggle {
173
+ background: transparent url(/wp-content/plugins/styles/css/font-sprites.png) no-repeat 6px 6px;
174
+ width: 9px;
175
+ height: 12px;
176
+ padding: 6px;
177
+ text-indent: -9999px;
178
+ overflow:hidden;
179
+ display:inline-block;
180
+ -moz-border-radius: 3px;
181
+ -khtml-border-radius: 3px;
182
+ -webkit-border-radius: 3px;
183
+ border-radius: 3px;
184
+ position:relative;
185
+ top:9px;
186
+ }
187
+
188
+ .font-weight {
189
+ width: 9px;
190
+ height: 12px;
191
+ }
192
+
193
+ .font-style {
194
+ background-position: -13px 6px;
195
+ }
196
+
197
+ .font-weight-bold,
198
+ .font-style-italic {
199
+ background-color: #C1E7FF;
200
+ }
201
+
202
+ .text-transform {
203
+ background-position: -57px 6px;
204
+ &:hover {
205
+ background-color: #C1E7FF;
206
+ }
207
+ }
208
+ .text-transform-uppercase { background-position: -77px 6px; }
209
+ .text-transform-lowercase { background-position: -96px 6px; }
210
+
211
+ .line-height{background-position: -114px 6px;}
212
+ .line-height:hover {background-color: #C1E7FF;}
213
+ .line-height-125 { background-position: -134px 6px; }
214
+ .line-height-15 { background-position: -154px 6px; }
215
+ .line-height-175 { background-position: -174px 6px; }
216
+ .line-height-2 { background-position: -194px 6px; }
217
+
218
+ /* Slider */
219
+ .pds_slider_ui {
220
+ width: 200px;
221
+ display:none;
222
+ }
223
+
224
+ /* General */
225
+ .notice {
226
+ background-color: #ffebe8;
227
+ border-color: #c00;
228
+ border-width: 1px;
229
+ border-style: solid;
230
+ padding: 0 0.6em;
231
+ margin: 5px 15px 2px;
232
+ -moz-border-radius: 3px;
233
+ -khtml-border-radius: 3px;
234
+ -webkit-border-radius: 3px;
235
+ border-radius: 3px;
236
+ margin: 5px 0 15px;
237
+ a {
238
+ color: #c00;
239
+ }
240
+ p {
241
+ margin: 0.5em 0;
242
+ line-height: 1;
243
+ padding: 2px;
244
+ }
245
+ }
246
+
247
+ img.waiting {
248
+ display:none;
249
+ }
250
+
251
+ /* Yoast */
252
+
253
+ small {
254
+ font-weight:normal;
255
+ color:#777;
256
+ }
257
+ .inside {
258
+ ul {
259
+ margin-left: 20px;
260
+ li {
261
+ list-style: square;
262
+ line-height:16px;
263
+ &.rss {
264
+ list-style-image: url(/wp-includes/images/rss.png);
265
+ }
266
+ &.email {
267
+ list-style-image: url(http://cdn.yoast.com/email_sub.png);
268
+ }
269
+ }
270
+ }
271
+ .text {
272
+ width: 250px;
273
+ }
274
+ }
275
+ /* END Yoast */
276
+
277
+ } /* END StormStyles */
278
+
279
+ /* Color Picker */
280
+ table.jPicker {
281
+ line-height: 1;
282
+
283
+ padding: 0;
284
+ width: 290px;
285
+ input, textarea, select { padding: 0;}
286
+ .Title {display:none;}
287
+ .Map {margin-top:22px;}
288
+ td.Radio { width: 45px; }
289
+ td.Text input {
290
+ height: 21px;
291
+ padding: 3px;
292
+ width: 37px;
293
+ }
294
+ .AHex {display:none;}
295
+ .Button hr {display:none;}
296
+ .Grid {display:none;}
297
+ div.Map {
298
+ width:128px;
299
+ height: 128px;
300
+ }
301
+ div.Bar {
302
+ width: 20px;
303
+ height: 128px;
304
+ }
305
+ tr.Hue, tr.Saturation, tr.Value {display:none;}
306
+ .Preview {
307
+ text-align:left;
308
+ padding-left: 20px;
309
+
310
+ div {
311
+ width: 32px;
312
+ height: 18px;
313
+ margin:0;
314
+ span {
315
+ width: 14px;
316
+ height: 17px;
317
+ float: left;
318
+ }
319
+ }
320
+ }
321
+ td.Radio {
322
+ width: 14px;
323
+ }
324
+ input[type="radio"] {
325
+ display:none;
326
+ }
327
+ input {
328
+ font-family: Courier, monospace;
329
+ font-size: 11px;
330
+ }
331
+ input.Hex {
332
+ margin-left: 12px;
333
+ }
334
+ }
335
+
336
+ @media only screen and (max-width:768px){
337
+ .styles-admin {
338
+ .primary { width:100%; }
339
+ .secondary { display:none; }
340
+ }
341
+ }
css/bg-sprites.psd ADDED
Binary file
css/font-sprites.psd ADDED
Binary file
readme.txt CHANGED
@@ -6,7 +6,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
6
  Tags: css, stylesheet, scss, sass, scaffold, less, admin, gui, color picker, gradient, image upload, google fonts, user interface, twentyten, twentyeleven
7
  Requires at least: 3.1
8
  Tested up to: 3.3.1
9
- Stable tag: 0.5.1
10
 
11
  Change the appearance of supported themes using zero code. Creates appearance options for images, colors, gradients, and fonts.
12
 
@@ -80,6 +80,10 @@ For general purpose CSS processing, you'll be much better off using one of the m
80
 
81
  == Changelog ==
82
 
 
 
 
 
83
  = 0.5.1 =
84
  * Fix issue that would prevent Font styles from outputting if another option wasn't set on the same element.
85
 
6
  Tags: css, stylesheet, scss, sass, scaffold, less, admin, gui, color picker, gradient, image upload, google fonts, user interface, twentyten, twentyeleven
7
  Requires at least: 3.1
8
  Tested up to: 3.3.1
9
+ Stable tag: 0.5.1.1
10
 
11
  Change the appearance of supported themes using zero code. Creates appearance options for images, colors, gradients, and fonts.
12
 
80
 
81
  == Changelog ==
82
 
83
+ = 0.5.1.1 =
84
+ * Fix transparent background option
85
+ * Fix display of unavailable theme options
86
+
87
  = 0.5.1 =
88
  * Fix issue that would prevent Font styles from outputting if another option wasn't set on the same element.
89
 
styles.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Styles
4
  Plugin URI: http://stylesplugin.com
5
  Description: Change the appearance of your theme using the WordPress admin. Creates WordPress theme options for images, colors, gradients, and fonts.
6
- Version: 0.5.1
7
  Author: Brainstorm Media
8
  Author URI: http://brainstormmedia.com
9
  */
3
  Plugin Name: Styles
4
  Plugin URI: http://stylesplugin.com
5
  Description: Change the appearance of your theme using the WordPress admin. Creates WordPress theme options for images, colors, gradients, and fonts.
6
+ Version: 0.5.1.1
7
  Author: Brainstorm Media
8
  Author URI: http://brainstormmedia.com
9
  */