|
@@ -1,15 +1,15 @@ discard block |
|
|
block discarded – undo |
|
1
|
1
|
<?php |
|
2
|
2
|
|
|
3
|
|
-if ( isset($_GET['frm_style_setting']) || isset($_GET['flat']) ) { |
|
|
3
|
+if ( isset( $_GET['frm_style_setting'] ) || isset( $_GET['flat'] ) ) { |
|
4
|
4
|
if ( isset( $_GET['frm_style_setting'] ) ) { |
|
5
|
5
|
extract( $_GET['frm_style_setting']['post_content'] ); |
|
6
|
6
|
} else { |
|
7
|
|
- extract($_GET); |
|
|
7
|
+ extract( $_GET ); |
|
8
|
8
|
} |
|
9
|
9
|
|
|
10
|
|
- $important_style = isset($important_style) ? $important_style : 0; |
|
11
|
|
- $auto_width = isset($auto_width) ? $auto_width : 0; |
|
12
|
|
- $submit_style = isset($submit_style) ? $submit_style : 0; |
|
|
10
|
+ $important_style = isset( $important_style ) ? $important_style : 0; |
|
|
11
|
+ $auto_width = isset( $auto_width ) ? $auto_width : 0; |
|
|
12
|
+ $submit_style = isset( $submit_style ) ? $submit_style : 0; |
|
13
|
13
|
|
|
14
|
14
|
$style_name = FrmAppHelper::simple_get( 'style_name', 'sanitize_title' ); |
|
15
|
15
|
if ( ! empty( $style_name ) ) { |
|
@@ -19,10 +19,10 @@ discard block |
|
|
block discarded – undo |
|
19
|
19
|
} |
|
20
|
20
|
} else { |
|
21
|
21
|
$style_class = 'frm_style_' . $style->post_name . '.with_frm_style'; |
|
22
|
|
- extract($style->post_content); |
|
|
22
|
+ extract( $style->post_content ); |
|
23
|
23
|
} |
|
24
|
24
|
|
|
25
|
|
-$important = empty($important_style) ? '' : ' !important'; |
|
|
25
|
+$important = empty( $important_style ) ? '' : ' !important'; |
|
26
|
26
|
$label_margin = (int) $width + 10; |
|
27
|
27
|
|
|
28
|
28
|
$minus_icons = FrmStylesHelper::minus_icons(); |
|
@@ -39,7 +39,7 @@ discard block |
|
|
block discarded – undo |
|
39
|
39
|
$change_margin = 650 . 'px'; |
|
40
|
40
|
} |
|
41
|
41
|
|
|
42
|
|
-if ( ! isset($collapse_icon) ) { |
|
|
42
|
+if ( ! isset( $collapse_icon ) ) { |
|
43
|
43
|
$collapse_icon = 0; |
|
44
|
44
|
} |
|
45
|
45
|
|
|
@@ -148,11 +148,11 @@ discard block |
|
|
block discarded – undo |
|
148
|
148
|
} |
|
149
|
149
|
|
|
150
|
150
|
.<?php echo esc_html( $style_class ) ?> .frm_icon_font.frm_minus_icon:before{ |
|
151
|
|
- content:"\e<?php echo esc_html( isset( $minus_icons[ $repeat_icon ] ) ? $minus_icons[ $repeat_icon ]['-'] : $minus_icons[1]['-'] ) ?>"; |
|
|
151
|
+ content:"\e<?php echo esc_html( isset( $minus_icons[$repeat_icon] ) ? $minus_icons[$repeat_icon]['-'] : $minus_icons[1]['-'] ) ?>"; |
|
152
|
152
|
} |
|
153
|
153
|
|
|
154
|
154
|
.<?php echo esc_html( $style_class ) ?> .frm_icon_font.frm_plus_icon:before{ |
|
155
|
|
- content:"\e<?php echo esc_html( isset( $minus_icons[ $repeat_icon ] ) ? $minus_icons[ $repeat_icon ]['+'] : $minus_icons[1]['+'] ) ?>"; |
|
|
155
|
+ content:"\e<?php echo esc_html( isset( $minus_icons[$repeat_icon] ) ? $minus_icons[$repeat_icon]['+'] : $minus_icons[1]['+'] ) ?>"; |
|
156
|
156
|
} |
|
157
|
157
|
|
|
158
|
158
|
.<?php echo esc_html( $style_class ) ?> .frm_icon_font.frm_minus_icon:before, |
|
@@ -161,11 +161,11 @@ discard block |
|
|
block discarded – undo |
|
161
|
161
|
} |
|
162
|
162
|
|
|
163
|
163
|
.<?php echo esc_html( $style_class ) ?> .frm_trigger.active .frm_icon_font.frm_arrow_icon:before{ |
|
164
|
|
- content:"\e<?php echo esc_html( isset( $arrow_icons[ $collapse_icon ] ) ? $arrow_icons[ $collapse_icon ]['-'] : $arrow_icons[1]['-'] ) ?>"; |
|
|
164
|
+ content:"\e<?php echo esc_html( isset( $arrow_icons[$collapse_icon] ) ? $arrow_icons[$collapse_icon]['-'] : $arrow_icons[1]['-'] ) ?>"; |
|
165
|
165
|
} |
|
166
|
166
|
|
|
167
|
167
|
.<?php echo esc_html( $style_class ) ?> .frm_trigger .frm_icon_font.frm_arrow_icon:before{ |
|
168
|
|
- content:"\e<?php echo esc_html( isset( $arrow_icons[ $collapse_icon ] ) ? $arrow_icons[ $collapse_icon ]['+'] : $arrow_icons[1]['+'] ) ?>"; |
|
|
168
|
+ content:"\e<?php echo esc_html( isset( $arrow_icons[$collapse_icon] ) ? $arrow_icons[$collapse_icon]['+'] : $arrow_icons[1]['+'] ) ?>"; |
|
169
|
169
|
} |
|
170
|
170
|
|
|
171
|
171
|
.<?php echo esc_html( $style_class ) ?> .form-field{ |
|
@@ -187,7 +187,7 @@ discard block |
|
|
block discarded – undo |
|
187
|
187
|
.<?php echo esc_html( $style_class ) ?> .frm_error{ |
|
188
|
188
|
margin:0; |
|
189
|
189
|
padding:0; |
|
190
|
|
- font-family:<?php echo FrmAppHelper::kses( stripslashes($font) . $important ) ?>; |
|
|
190
|
+ font-family:<?php echo FrmAppHelper::kses( stripslashes( $font ) . $important ) ?>; |
|
191
|
191
|
font-size:<?php echo esc_html( $description_font_size . $important ) ?>; |
|
192
|
192
|
color:#<?php echo esc_html( $description_color . $important ) ?>; |
|
193
|
193
|
font-weight:<?php echo esc_html( $description_weight . $important ) ?>; |
|
@@ -293,7 +293,7 @@ discard block |
|
|
block discarded – undo |
|
293
|
293
|
|
|
294
|
294
|
.<?php echo esc_html( $style_class ) ?> .frm_scale label{ |
|
295
|
295
|
font-weight:<?php echo esc_html( $check_weight . $important ) ?>; |
|
296
|
|
- font-family:<?php echo FrmAppHelper::kses( stripslashes($font) . $important ) ?>; |
|
|
296
|
+ font-family:<?php echo FrmAppHelper::kses( stripslashes( $font ) . $important ) ?>; |
|
297
|
297
|
font-size:<?php echo esc_html( $check_font_size . $important ) ?>; |
|
298
|
298
|
color:#<?php echo esc_html( $check_label_color . $important ) ?>; |
|
299
|
299
|
} |
|
@@ -313,7 +313,7 @@ discard block |
|
|
block discarded – undo |
|
313
|
313
|
.<?php echo esc_html( $style_class ) ?> select, |
|
314
|
314
|
.<?php echo esc_html( $style_class ) ?> textarea, |
|
315
|
315
|
.<?php echo esc_html( $style_class ) ?> .chosen-container{ |
|
316
|
|
- font-family:<?php echo FrmAppHelper::kses( stripslashes($font) . $important ) ?>; |
|
|
316
|
+ font-family:<?php echo FrmAppHelper::kses( stripslashes( $font ) . $important ) ?>; |
|
317
|
317
|
font-size:<?php echo esc_html( $field_font_size ) ?>; |
|
318
|
318
|
margin-bottom:0<?php echo esc_html( $important ) ?>; |
|
319
|
319
|
} |
|
@@ -336,7 +336,7 @@ discard block |
|
|
block discarded – undo |
|
336
|
336
|
.<?php echo esc_html( $style_class ) ?> .chosen-container-single .chosen-single{ |
|
337
|
337
|
color:#<?php echo esc_html( $text_color . $important ) ?>; |
|
338
|
338
|
background-color:<?php echo esc_html( ( empty( $bg_color ) ? 'transparent' : '#' . $bg_color ) . $important ); ?>; |
|
339
|
|
-<?php if ( ! empty($important) ) { |
|
|
339
|
+<?php if ( ! empty( $important ) ) { |
|
340
|
340
|
echo esc_html( 'background-image:none' . $important . ';' ); |
|
341
|
341
|
} |
|
342
|
342
|
?> |
|
@@ -494,7 +494,7 @@ discard block |
|
|
block discarded – undo |
|
494
|
494
|
line-height:normal<?php echo esc_html( $important ) ?>; |
|
495
|
495
|
text-align:center; |
|
496
|
496
|
background:#<?php echo esc_html( $submit_bg_color ); |
|
497
|
|
- if ( ! empty($submit_bg_img) ) { |
|
|
497
|
+ if ( ! empty( $submit_bg_img ) ) { |
|
498
|
498
|
echo esc_html( ' url(' . $submit_bg_img . ')' ); |
|
499
|
499
|
} |
|
500
|
500
|
echo esc_html( $important ); ?>; |
|
@@ -592,7 +592,7 @@ discard block |
|
|
block discarded – undo |
|
592
|
592
|
|
|
593
|
593
|
.<?php echo esc_html( $style_class ) ?> .frm_radio label, |
|
594
|
594
|
.<?php echo esc_html( $style_class ) ?> .frm_checkbox label{ |
|
595
|
|
- font-family:<?php echo FrmAppHelper::kses( stripslashes($font) . $important ) ?>; |
|
|
595
|
+ font-family:<?php echo FrmAppHelper::kses( stripslashes( $font ) . $important ) ?>; |
|
596
|
596
|
font-size:<?php echo esc_html( $check_font_size . $important ) ?>; |
|
597
|
597
|
color:#<?php echo esc_html( $check_label_color . $important ) ?>; |
|
598
|
598
|
font-weight:<?php echo esc_html( $check_weight . $important ) ?>; |
|
@@ -733,7 +733,7 @@ discard block |
|
|
block discarded – undo |
|
733
|
733
|
-webkit-border-radius:<?php echo esc_html( $border_radius . $important ) ?>; |
|
734
|
734
|
border-radius:<?php echo esc_html( $border_radius . $important ) ?>; |
|
735
|
735
|
font-size:<?php echo esc_html( $submit_font_size . $important ) ?>; |
|
736
|
|
- font-family:<?php echo FrmAppHelper::kses( stripslashes($font) . $important ) ?>; |
|
|
736
|
+ font-family:<?php echo FrmAppHelper::kses( stripslashes( $font ) . $important ) ?>; |
|
737
|
737
|
font-weight:<?php echo esc_html( $submit_weight . $important ) ?>; |
|
738
|
738
|
color:#<?php echo esc_html( $submit_text_color . $important ) ?>; |
|
739
|
739
|
background:#<?php echo esc_html( $submit_bg_color . $important ) ?>; |
|
@@ -852,10 +852,10 @@ discard block |
|
|
block discarded – undo |
|
852
|
852
|
.<?php echo esc_html( $style_class ) ?> .chosen-container-single .chosen-single div{ |
|
853
|
853
|
<?php |
|
854
|
854
|
// calculate the top position based on field padding |
|
855
|
|
- $top_pad = explode(' ', $field_pad); |
|
856
|
|
- $top_pad = reset($top_pad); // the top padding is listed first |
|
857
|
|
- $pad_unit = preg_replace('/[0-9]+/', '', $top_pad); //px, em, rem... |
|
858
|
|
- $top_margin = (int) str_replace($pad_unit, '', $top_pad) / 2; |
|
|
855
|
+ $top_pad = explode( ' ', $field_pad ); |
|
|
856
|
+ $top_pad = reset( $top_pad ); // the top padding is listed first |
|
|
857
|
+ $pad_unit = preg_replace( '/[0-9]+/', '', $top_pad ); //px, em, rem... |
|
|
858
|
+ $top_margin = (int) str_replace( $pad_unit, '', $top_pad ) / 2; |
|
859
|
859
|
?> |
|
860
|
860
|
top:<?php echo esc_html( $top_margin . $pad_unit . $important ) ?>; |
|
861
|
861
|
} |