Completed
Push — master ( af4004...c351ef )
by Jamie
03:28
created
classes/views/xml/xml.php 2 patches
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -7,24 +7,24 @@
 block discarded – undo
7 7
 <?php
8 8
 foreach ( $type as $tb_type ) {
9 9
 
10
-    if ( ! isset( $tables[ $tb_type ] ) ) {
11
-        do_action('frm_xml_import_'. $tb_type, $args);
12
-        continue;
13
-    }
10
+	if ( ! isset( $tables[ $tb_type ] ) ) {
11
+		do_action('frm_xml_import_'. $tb_type, $args);
12
+		continue;
13
+	}
14 14
 
15
-    //no records
16
-    if ( ! isset( $records[ $tb_type ] ) ) {
17
-        continue;
18
-    }
15
+	//no records
16
+	if ( ! isset( $records[ $tb_type ] ) ) {
17
+		continue;
18
+	}
19 19
 
20 20
 	$item_ids = $records[ $tb_type ];
21 21
 	if ( in_array( $tb_type, array( 'styles', 'actions' ) ) ) {
22
-        include(dirname(__FILE__) .'/posts_xml.php');
23
-    } else if ( file_exists(dirname(__FILE__) .'/'. $tb_type .'_xml.php') ) {
24
-        include(dirname(__FILE__) .'/'. $tb_type .'_xml.php');
22
+		include(dirname(__FILE__) .'/posts_xml.php');
23
+	} else if ( file_exists(dirname(__FILE__) .'/'. $tb_type .'_xml.php') ) {
24
+		include(dirname(__FILE__) .'/'. $tb_type .'_xml.php');
25 25
 	} else if ( file_exists( FrmAppHelper::plugin_path() . '/pro/classes/views/xml/' . $tb_type . '_xml.php' ) ) {
26
-        include( FrmAppHelper::plugin_path() .'/pro/classes/views/xml/'. $tb_type .'_xml.php' );
27
-    }
26
+		include( FrmAppHelper::plugin_path() .'/pro/classes/views/xml/'. $tb_type .'_xml.php' );
27
+	}
28 28
 
29 29
 	unset( $item_ids, $records[ $tb_type ], $tb_type );
30 30
 }
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -7,26 +7,26 @@
 block discarded – undo
7 7
 <?php
8 8
 foreach ( $type as $tb_type ) {
9 9
 
10
-    if ( ! isset( $tables[ $tb_type ] ) ) {
11
-        do_action('frm_xml_import_'. $tb_type, $args);
10
+    if ( ! isset( $tables[$tb_type] ) ) {
11
+        do_action( 'frm_xml_import_' . $tb_type, $args );
12 12
         continue;
13 13
     }
14 14
 
15 15
     //no records
16
-    if ( ! isset( $records[ $tb_type ] ) ) {
16
+    if ( ! isset( $records[$tb_type] ) ) {
17 17
         continue;
18 18
     }
19 19
 
20
-	$item_ids = $records[ $tb_type ];
20
+	$item_ids = $records[$tb_type];
21 21
 	if ( in_array( $tb_type, array( 'styles', 'actions' ) ) ) {
22
-        include(dirname(__FILE__) .'/posts_xml.php');
23
-    } else if ( file_exists(dirname(__FILE__) .'/'. $tb_type .'_xml.php') ) {
24
-        include(dirname(__FILE__) .'/'. $tb_type .'_xml.php');
22
+        include( dirname( __FILE__ ) . '/posts_xml.php' );
23
+    } else if ( file_exists( dirname( __FILE__ ) . '/' . $tb_type . '_xml.php' ) ) {
24
+        include( dirname( __FILE__ ) . '/' . $tb_type . '_xml.php' );
25 25
 	} else if ( file_exists( FrmAppHelper::plugin_path() . '/pro/classes/views/xml/' . $tb_type . '_xml.php' ) ) {
26
-        include( FrmAppHelper::plugin_path() .'/pro/classes/views/xml/'. $tb_type .'_xml.php' );
26
+        include( FrmAppHelper::plugin_path() . '/pro/classes/views/xml/' . $tb_type . '_xml.php' );
27 27
     }
28 28
 
29
-	unset( $item_ids, $records[ $tb_type ], $tb_type );
29
+	unset( $item_ids, $records[$tb_type], $tb_type );
30 30
 }
31 31
 
32 32
 ?>
Please login to merge, or discard this patch.
classes/widgets/FrmShowForm.php 2 patches
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -8,14 +8,14 @@  discard block
 block discarded – undo
8 8
 	}
9 9
 
10 10
 	public function widget( $args, $instance ) {
11
-        if ( empty($instance['title']) ) {
12
-            $title = FrmForm::getName( $instance['form'] );
13
-        } else {
14
-            $title = $instance['title'];
15
-        }
16
-        $title = apply_filters('widget_title', $title);
11
+		if ( empty($instance['title']) ) {
12
+			$title = FrmForm::getName( $instance['form'] );
13
+		} else {
14
+			$title = $instance['title'];
15
+		}
16
+		$title = apply_filters('widget_title', $title);
17 17
 
18
-        $instance['description'] = isset($instance['description']) ? $instance['description'] : false;
18
+		$instance['description'] = isset($instance['description']) ? $instance['description'] : false;
19 19
 
20 20
 		echo $args['before_widget'];
21 21
 
@@ -35,9 +35,9 @@  discard block
 block discarded – undo
35 35
 	}
36 36
 
37 37
 	public function form( $instance ) {
38
-	    //Defaults
38
+		//Defaults
39 39
 		$instance = wp_parse_args( (array) $instance, array(
40
-		    'title' => false, 'form' => false, 'description' => false,
40
+			'title' => false, 'form' => false, 'description' => false,
41 41
 		) );
42 42
 ?>
43 43
 	<p><label for="<?php echo esc_attr( $this->get_field_id('title') ); ?>"><?php _e( 'Title', 'formidable' ) ?>:</label><br/>
@@ -45,10 +45,10 @@  discard block
 block discarded – undo
45 45
 
46 46
 	<p><label for="<?php echo esc_attr( $this->get_field_id('form') ); ?>"><?php _e( 'Form', 'formidable' ) ?>:</label><br/>
47 47
 <?php
48
-	    FrmFormsHelper::forms_dropdown( $this->get_field_name('form'), $instance['form'], array(
49
-	        'blank' => false, 'field_id' => $this->get_field_id('form'),
50
-            'class' => 'widefat',
51
-	    ) );
48
+		FrmFormsHelper::forms_dropdown( $this->get_field_name('form'), $instance['form'], array(
49
+			'blank' => false, 'field_id' => $this->get_field_id('form'),
50
+			'class' => 'widefat',
51
+		) );
52 52
 ?>
53 53
 	</p>
54 54
 
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -4,27 +4,27 @@  discard block
 block discarded – undo
4 4
 
5 5
 	public function __construct() {
6 6
 		$widget_ops = array( 'description' => __( 'Display a Formidable Form', 'formidable' ) );
7
-		parent::__construct('frm_show_form', __( 'Formidable Form', 'formidable' ), $widget_ops);
7
+		parent::__construct( 'frm_show_form', __( 'Formidable Form', 'formidable' ), $widget_ops );
8 8
 	}
9 9
 
10 10
 	public function widget( $args, $instance ) {
11
-        if ( empty($instance['title']) ) {
11
+        if ( empty( $instance['title'] ) ) {
12 12
             $title = FrmForm::getName( $instance['form'] );
13 13
         } else {
14 14
             $title = $instance['title'];
15 15
         }
16
-        $title = apply_filters('widget_title', $title);
16
+        $title = apply_filters( 'widget_title', $title );
17 17
 
18
-        $instance['description'] = isset($instance['description']) ? $instance['description'] : false;
18
+        $instance['description'] = isset( $instance['description'] ) ? $instance['description'] : false;
19 19
 
20 20
 		echo $args['before_widget'];
21 21
 
22 22
 		echo '<div class="frm_form_widget">';
23 23
 		if ( $title ) {
24
-			echo $args['before_title'] . stripslashes($title) . $args['after_title'];
24
+			echo $args['before_title'] . stripslashes( $title ) . $args['after_title'];
25 25
 		}
26 26
 
27
-		echo FrmFormsController::show_form($instance['form'], '', false, $instance['description']);
27
+		echo FrmFormsController::show_form( $instance['form'], '', false, $instance['description'] );
28 28
 
29 29
 		echo '</div>';
30 30
 		echo $args['after_widget'];
@@ -40,19 +40,19 @@  discard block
 block discarded – undo
40 40
 		    'title' => false, 'form' => false, 'description' => false,
41 41
 		) );
42 42
 ?>
43
-	<p><label for="<?php echo esc_attr( $this->get_field_id('title') ); ?>"><?php _e( 'Title', 'formidable' ) ?>:</label><br/>
44
-	<input type="text" class="widefat" id="<?php echo esc_attr( $this->get_field_id('title') ); ?>" name="<?php echo esc_attr( $this->get_field_name('title') ); ?>" value="<?php echo esc_attr( stripslashes($instance['title']) ); ?>" /></p>
43
+	<p><label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>"><?php _e( 'Title', 'formidable' ) ?>:</label><br/>
44
+	<input type="text" class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>" value="<?php echo esc_attr( stripslashes( $instance['title'] ) ); ?>" /></p>
45 45
 
46
-	<p><label for="<?php echo esc_attr( $this->get_field_id('form') ); ?>"><?php _e( 'Form', 'formidable' ) ?>:</label><br/>
46
+	<p><label for="<?php echo esc_attr( $this->get_field_id( 'form' ) ); ?>"><?php _e( 'Form', 'formidable' ) ?>:</label><br/>
47 47
 <?php
48
-	    FrmFormsHelper::forms_dropdown( $this->get_field_name('form'), $instance['form'], array(
49
-	        'blank' => false, 'field_id' => $this->get_field_id('form'),
48
+	    FrmFormsHelper::forms_dropdown( $this->get_field_name( 'form' ), $instance['form'], array(
49
+	        'blank' => false, 'field_id' => $this->get_field_id( 'form' ),
50 50
             'class' => 'widefat',
51 51
 	    ) );
52 52
 ?>
53 53
 	</p>
54 54
 
55
-	<p><label for="<?php echo esc_attr( $this->get_field_id('description') ); ?>"><input class="checkbox" type="checkbox" <?php checked($instance['description'], true) ?> id="<?php echo esc_attr( $this->get_field_id('description') ); ?>" name="<?php echo esc_attr( $this->get_field_name('description') ); ?>" value="1" />
55
+	<p><label for="<?php echo esc_attr( $this->get_field_id( 'description' ) ); ?>"><input class="checkbox" type="checkbox" <?php checked( $instance['description'], true ) ?> id="<?php echo esc_attr( $this->get_field_id( 'description' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'description' ) ); ?>" value="1" />
56 56
 	<?php _e( 'Show Description', 'formidable' ) ?></label></p>
57 57
 <?php
58 58
 	}
Please login to merge, or discard this patch.
css/_single_theme.css.php 2 patches
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -3,23 +3,23 @@  discard block
 block discarded – undo
3 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
-    } else {
7
-        extract($_GET);
8
-    }
6
+	} else {
7
+		extract($_GET);
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 ) ) {
16 16
 		$style_class = $style_name . '.with_frm_style';
17
-    } else {
18
-        $style_class = 'with_frm_style';
19
-    }
17
+	} else {
18
+		$style_class = 'with_frm_style';
19
+	}
20 20
 } else {
21
-    $style_class = 'frm_style_'. $style->post_name .'.with_frm_style';
22
-    extract($style->post_content);
21
+	$style_class = 'frm_style_'. $style->post_name .'.with_frm_style';
22
+	extract($style->post_content);
23 23
 }
24 24
 
25 25
 $important = empty($important_style) ? '' : ' !important';
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 }
41 41
 
42 42
 if ( ! isset($collapse_icon) ) {
43
-    $collapse_icon = 0;
43
+	$collapse_icon = 0;
44 44
 }
45 45
 
46 46
 if ( ! isset( $center_form ) ) {
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
     color:#<?php echo esc_html( $text_color . $important ) ?>;
324 324
     background-color:#<?php echo esc_html( $bg_color . $important ); ?>;
325 325
 <?php if ( ! empty($important) ) {
326
-    echo esc_html( 'background-image:none' . $important . ';' );
326
+	echo esc_html( 'background-image:none' . $important . ';' );
327 327
 }
328 328
 ?>
329 329
     border-color:#<?php echo esc_html( $border_color . $important ) ?>;
@@ -530,7 +530,7 @@  discard block
 block discarded – undo
530 530
     color:#<?php echo esc_html( $submit_active_color . $important ) ?>;
531 531
 }
532 532
 <?php
533
-    }
533
+	}
534 534
 }
535 535
 ?>
536 536
 
@@ -832,11 +832,11 @@  discard block
 block discarded – undo
832 832
 
833 833
 .<?php echo esc_html( $style_class ) ?> .chosen-container-single .chosen-single div{
834 834
 <?php
835
-    // calculate the top position based on field padding
836
-    $top_pad = explode(' ', $field_pad);
837
-    $top_pad = reset($top_pad); // the top padding is listed first
838
-    $pad_unit = preg_replace('/[0-9]+/', '', $top_pad); //px, em, rem...
839
-    $top_margin = (int) str_replace($pad_unit, '', $top_pad) / 2;
835
+	// calculate the top position based on field padding
836
+	$top_pad = explode(' ', $field_pad);
837
+	$top_pad = reset($top_pad); // the top padding is listed first
838
+	$pad_unit = preg_replace('/[0-9]+/', '', $top_pad); //px, em, rem...
839
+	$top_margin = (int) str_replace($pad_unit, '', $top_pad) / 2;
840 840
 ?>
841 841
     top:<?php echo esc_html( $top_margin . $pad_unit . $important ) ?>;
842 842
 }
Please login to merge, or discard this patch.
Spacing   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -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 ) ) {
@@ -18,11 +18,11 @@  discard block
 block discarded – undo
18 18
         $style_class = 'with_frm_style';
19 19
     }
20 20
 } else {
21
-    $style_class = 'frm_style_'. $style->post_name .'.with_frm_style';
22
-    extract($style->post_content);
21
+    $style_class = 'frm_style_' . $style->post_name . '.with_frm_style';
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
 
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
     border:<?php echo esc_html( $fieldset ) ?> solid #<?php echo esc_html( $fieldset_color . $important ) ?>;
77 77
     margin:0;
78 78
     padding:<?php echo esc_html( $fieldset_padding . $important ) ?>;
79
-    background-color:<?php echo esc_html( empty($fieldset_bg_color) ? 'transparent' : '#'. $fieldset_bg_color ); ?>;
79
+    background-color:<?php echo esc_html( empty( $fieldset_bg_color ) ? 'transparent' : '#' . $fieldset_bg_color ); ?>;
80 80
 }
81 81
 
82 82
 .<?php echo esc_html( $style_class ) ?> legend + h3,
@@ -120,8 +120,8 @@  discard block
 block discarded – undo
120 120
 }
121 121
 
122 122
 .<?php echo esc_html( $style_class ) ?> .frm_repeat_sec{
123
-    margin-bottom:<?php echo esc_html( $field_margin. $important ) ?>;
124
-    margin-top:<?php echo esc_html( $field_margin. $important ) ?>;
123
+    margin-bottom:<?php echo esc_html( $field_margin . $important ) ?>;
124
+    margin-top:<?php echo esc_html( $field_margin . $important ) ?>;
125 125
 }
126 126
 
127 127
 .<?php echo esc_html( $style_class ) ?> label.frm_primary_label,
@@ -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,15 +161,15 @@  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{
172
-    margin-bottom:<?php echo esc_html( $field_margin. $important ) ?>;
172
+    margin-bottom:<?php echo esc_html( $field_margin . $important ) ?>;
173 173
 }
174 174
 .<?php echo esc_html( $style_class ) ?> .frm_grid,
175 175
 .<?php echo esc_html( $style_class ) ?> .frm_grid_first,
@@ -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 ) ?>;
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
 }
269 269
 
270 270
 .<?php echo esc_html( $style_class ) ?> .form-field.frm_col_field div.frm_description{
271
-    width:<?php echo esc_html( ( $field_width == '' ? 'auto' : $field_width )  . $important ) ?>;
271
+    width:<?php echo esc_html( ( $field_width == '' ? 'auto' : $field_width ) . $important ) ?>;
272 272
     max-width:100%;
273 273
 }
274 274
 
@@ -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
 }
@@ -335,8 +335,8 @@  discard block
 block discarded – undo
335 335
 .<?php echo esc_html( $style_class ) ?> .chosen-container-multi .chosen-choices,
336 336
 .<?php echo esc_html( $style_class ) ?> .chosen-container-single .chosen-single{
337 337
     color:#<?php echo esc_html( $text_color . $important ) ?>;
338
-    background-color:<?php echo esc_html( ( empty($bg_color) ? 'transparent' : '#'. $bg_color ) . $important ); ?>;
339
-<?php if ( ! empty($important) ) {
338
+    background-color:<?php echo esc_html( ( empty( $bg_color ) ? 'transparent' : '#' . $bg_color ) . $important ); ?>;
339
+<?php if ( ! empty( $important ) ) {
340 340
     echo esc_html( 'background-image:none' . $important . ';' );
341 341
 }
342 342
 ?>
@@ -360,7 +360,7 @@  discard block
 block discarded – undo
360 360
 
361 361
 .<?php echo esc_html( $style_class ) ?> input[type=file]::-webkit-file-upload-button{
362 362
     color:#<?php echo esc_html( $text_color . $important ) ?>;
363
-    background-color:<?php echo esc_html( ( empty($bg_color) ? 'transparent' : '#'. $bg_color ) . $important ); ?>;
363
+    background-color:<?php echo esc_html( ( empty( $bg_color ) ? 'transparent' : '#' . $bg_color ) . $important ); ?>;
364 364
 	padding:<?php echo esc_html( $field_pad . $important ) ?>;
365 365
 	border-radius:<?php echo esc_html( $border_radius . $important ) ?>;
366 366
 	border-color:#<?php echo esc_html( $border_color . $important ) ?>;
@@ -438,7 +438,7 @@  discard block
 block discarded – undo
438 438
 }
439 439
 
440 440
 .<?php echo esc_html( $style_class ) ?> .mceIframeContainer{
441
-    background-color:<?php echo esc_html( ( empty($bg_color) ? 'transparent' : '#'. $bg_color ) . $important ); ?>;
441
+    background-color:<?php echo esc_html( ( empty( $bg_color ) ? 'transparent' : '#' . $bg_color ) . $important ); ?>;
442 442
 }
443 443
 
444 444
 .<?php echo esc_html( $style_class ) ?> .auto_width input,
@@ -454,7 +454,7 @@  discard block
 block discarded – undo
454 454
 .<?php echo esc_html( $style_class ) ?> input[readonly],
455 455
 .<?php echo esc_html( $style_class ) ?> select[readonly],
456 456
 .<?php echo esc_html( $style_class ) ?> textarea[readonly]{
457
-    background-color:<?php echo esc_html( ( empty($bg_color_disabled) ? 'transparent' : '#'. $bg_color_disabled ) . $important ); ?>;
457
+    background-color:<?php echo esc_html( ( empty( $bg_color_disabled ) ? 'transparent' : '#' . $bg_color_disabled ) . $important ); ?>;
458 458
     color:#<?php echo esc_html( $text_color_disabled . $important ) ?>;
459 459
     border-color:#<?php echo esc_html( $border_color_disabled . $important ) ?>;
460 460
 }
@@ -472,7 +472,7 @@  discard block
 block discarded – undo
472 472
 .<?php echo esc_html( $style_class ) ?> .frm_focus_field input[type=search],
473 473
 .frm_form_fields_active_style,
474 474
 .<?php echo esc_html( $style_class ) ?> .chosen-container-active .chosen-choices{
475
-    background-color:<?php echo esc_html( ( empty($bg_color_active) ? 'transparent' : '#'. $bg_color_active ) . $important ); ?>;
475
+    background-color:<?php echo esc_html( ( empty( $bg_color_active ) ? 'transparent' : '#' . $bg_color_active ) . $important ); ?>;
476 476
     border-color:#<?php echo esc_html( $border_color_active . $important ) ?>;
477 477
     <?php if ( isset( $remove_box_shadow_active ) && $remove_box_shadow_active ) { ?>
478 478
     box-shadow:none;
@@ -494,8 +494,8 @@  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) ) {
498
-		echo esc_html( ' url('. $submit_bg_img .')' );
497
+	if ( ! empty( $submit_bg_img ) ) {
498
+		echo esc_html( ' url(' . $submit_bg_img . ')' );
499 499
 	}
500 500
 	echo esc_html( $important ); ?>;
501 501
     border-width:<?php echo esc_html( $submit_border_width ) ?>;
@@ -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 ) ?>;
@@ -612,7 +612,7 @@  discard block
 block discarded – undo
612 612
 .<?php echo esc_html( $style_class ) ?> .frm_blank_field .g-recaptcha iframe,
613 613
 .<?php echo esc_html( $style_class ) ?> .frm_blank_field .chosen-container-multi .chosen-choices{
614 614
     color:#<?php echo esc_html( $text_color_error . $important ) ?>;
615
-    background-color:<?php echo esc_html( ( empty($bg_color_error) ? 'transparent' : '#'. $bg_color_error ) . $important ); ?>;
615
+    background-color:<?php echo esc_html( ( empty( $bg_color_error ) ? 'transparent' : '#' . $bg_color_error ) . $important ); ?>;
616 616
     border-color:#<?php echo esc_html( $border_color_error . $important ) ?>;
617 617
     border-width:<?php echo esc_html( $border_width_error . $important ) ?>;
618 618
     border-style:<?php echo esc_html( $border_style_error . $important ) ?>;
@@ -628,7 +628,7 @@  discard block
 block discarded – undo
628 628
 }
629 629
 
630 630
 .<?php echo esc_html( $style_class ) ?> .frm_error_style{
631
-    background-color:<?php echo esc_html( ( empty($error_bg) ? 'transparent' : '#'. $error_bg ) . $important ); ?>;
631
+    background-color:<?php echo esc_html( ( empty( $error_bg ) ? 'transparent' : '#' . $error_bg ) . $important ); ?>;
632 632
     border:1px solid #<?php echo esc_html( $error_border . $important ) ?>;
633 633
     color:#<?php echo esc_html( $error_text . $important ) ?>;
634 634
     font-size:<?php echo esc_html( $error_font_size . $important ) ?>;
@@ -639,7 +639,7 @@  discard block
 block discarded – undo
639 639
 .<?php echo esc_html( $style_class ) ?> .frm_message,
640 640
 .frm_success_style{
641 641
     border:1px solid #<?php echo esc_html( $success_border_color ) ?>;
642
-    background-color:<?php echo esc_html( ( empty($success_bg_color) ? 'transparent' : '#'. $success_bg_color ) . $important ); ?>;
642
+    background-color:<?php echo esc_html( ( empty( $success_bg_color ) ? 'transparent' : '#' . $success_bg_color ) . $important ); ?>;
643 643
     color:#<?php echo esc_html( $success_text_color ) ?>;
644 644
 }
645 645
 
@@ -664,7 +664,7 @@  discard block
 block discarded – undo
664 664
 
665 665
 .form_results.<?php echo esc_html( $style_class ) ?> tr.frm_even,
666 666
 .frm-grid .frm_even{
667
-    background-color:<?php echo esc_html( ( empty($bg_color) ? 'transparent' : '#'. $bg_color ) . $important ); ?>;
667
+    background-color:<?php echo esc_html( ( empty( $bg_color ) ? 'transparent' : '#' . $bg_color ) . $important ); ?>;
668 668
 }
669 669
 
670 670
 .<?php echo esc_html( $style_class ) ?> #frm_loading .progress-striped .progress-bar{
@@ -672,7 +672,7 @@  discard block
 block discarded – undo
672 672
 }
673 673
 
674 674
 .<?php echo esc_html( $style_class ) ?> #frm_loading .progress-bar{
675
-    background-color:<?php echo esc_html( ( empty($bg_color) ? 'transparent' : '#'. $bg_color ) . $important ); ?>;
675
+    background-color:<?php echo esc_html( ( empty( $bg_color ) ? 'transparent' : '#' . $bg_color ) . $important ); ?>;
676 676
 }
677 677
 
678 678
 .<?php echo esc_html( $style_class ) ?> .frm_grid,
@@ -684,21 +684,21 @@  discard block
 block discarded – undo
684 684
 .<?php echo esc_html( $style_class ) ?> .frm_grid.frm_blank_field,
685 685
 .<?php echo esc_html( $style_class ) ?> .frm_grid_first.frm_blank_field,
686 686
 .<?php echo esc_html( $style_class ) ?> .frm_grid_odd.frm_blank_field{
687
-    background-color:<?php echo esc_html( ( empty($error_bg) ? 'transparent' : '#'. $error_bg ) . $important ); ?>;
687
+    background-color:<?php echo esc_html( ( empty( $error_bg ) ? 'transparent' : '#' . $error_bg ) . $important ); ?>;
688 688
     border-color:#<?php echo esc_html( $error_border ) ?>;
689 689
 }
690 690
 
691 691
 .<?php echo esc_html( $style_class ) ?> .frm_grid_first,
692 692
 .<?php echo esc_html( $style_class ) ?> .frm_grid_odd{
693
-    background-color:<?php echo esc_html( ( empty($bg_color) ? 'transparent' : '#'. $bg_color ) . $important ); ?>;
693
+    background-color:<?php echo esc_html( ( empty( $bg_color ) ? 'transparent' : '#' . $bg_color ) . $important ); ?>;
694 694
 }
695 695
 
696 696
 .<?php echo esc_html( $style_class ) ?> .frm_grid{
697
-    background-color:<?php echo esc_html( ( empty($bg_color_active) ? 'transparent' : '#'. $bg_color_active ) . $important ); ?>;
697
+    background-color:<?php echo esc_html( ( empty( $bg_color_active ) ? 'transparent' : '#' . $bg_color_active ) . $important ); ?>;
698 698
 }
699 699
 
700 700
 .<?php echo esc_html( $style_class ) ?> .frm_form_field.frm_html_scroll_box{
701
-    background-color:<?php echo esc_html( ( empty($bg_color) ? 'transparent' : '#'. $bg_color ) . $important ); ?>;
701
+    background-color:<?php echo esc_html( ( empty( $bg_color ) ? 'transparent' : '#' . $bg_color ) . $important ); ?>;
702 702
     border-color:#<?php echo esc_html( $border_color . $important ) ?>;
703 703
     border-width:<?php echo esc_html( $field_border_width . $important ) ?>;
704 704
     border-style:<?php echo esc_html( $field_border_style . $important ) ?>;
@@ -732,7 +732,7 @@  discard block
 block discarded – undo
732 732
     -webkit-border-radius:<?php echo esc_html( $border_radius . $important ) ?>;
733 733
     border-radius:<?php echo esc_html( $border_radius . $important ) ?>;
734 734
     font-size:<?php echo esc_html( $submit_font_size . $important ) ?>;
735
-    font-family:<?php echo FrmAppHelper::kses( stripslashes($font) . $important ) ?>;
735
+    font-family:<?php echo FrmAppHelper::kses( stripslashes( $font ) . $important ) ?>;
736 736
     font-weight:<?php echo esc_html( $submit_weight . $important ) ?>;
737 737
     color:#<?php echo esc_html( $submit_text_color . $important ) ?>;
738 738
     background:#<?php echo esc_html( $submit_bg_color . $important ) ?>;
@@ -851,10 +851,10 @@  discard block
 block discarded – undo
851 851
 .<?php echo esc_html( $style_class ) ?> .chosen-container-single .chosen-single div{
852 852
 <?php
853 853
     // calculate the top position based on field padding
854
-    $top_pad = explode(' ', $field_pad);
855
-    $top_pad = reset($top_pad); // the top padding is listed first
856
-    $pad_unit = preg_replace('/[0-9]+/', '', $top_pad); //px, em, rem...
857
-    $top_margin = (int) str_replace($pad_unit, '', $top_pad) / 2;
854
+    $top_pad = explode( ' ', $field_pad );
855
+    $top_pad = reset( $top_pad ); // the top padding is listed first
856
+    $pad_unit = preg_replace( '/[0-9]+/', '', $top_pad ); //px, em, rem...
857
+    $top_margin = (int) str_replace( $pad_unit, '', $top_pad ) / 2;
858 858
 ?>
859 859
     top:<?php echo esc_html( $top_margin . $pad_unit . $important ) ?>;
860 860
 }
Please login to merge, or discard this patch.
css/custom_theme.css.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,15 +1,15 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 if ( ! isset($saving) ) {
3
-    header( 'Content-type: text/css' );
3
+	header( 'Content-type: text/css' );
4 4
 
5
-    if ( isset($css) && $css ) {
6
-        echo $css;
7
-        die();
8
-    }
5
+	if ( isset($css) && $css ) {
6
+		echo $css;
7
+		die();
8
+	}
9 9
 }
10 10
 
11 11
 if ( ! isset($frm_style) ) {
12
-    $frm_style = new FrmStyle();
12
+	$frm_style = new FrmStyle();
13 13
 }
14 14
 
15 15
 $styles = $frm_style->get_all();
@@ -178,8 +178,8 @@  discard block
 block discarded – undo
178 178
 
179 179
 <?php
180 180
 foreach ( $styles as $style ) {
181
-    include(dirname(__FILE__) .'/_single_theme.css.php');
182
-    unset($style);
181
+	include(dirname(__FILE__) .'/_single_theme.css.php');
182
+	unset($style);
183 183
 }
184 184
 ?>
185 185
 
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,19 +1,19 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! isset($saving) ) {
2
+if ( ! isset( $saving ) ) {
3 3
     header( 'Content-type: text/css' );
4 4
 
5
-    if ( isset($css) && $css ) {
5
+    if ( isset( $css ) && $css ) {
6 6
         echo $css;
7 7
         die();
8 8
     }
9 9
 }
10 10
 
11
-if ( ! isset($frm_style) ) {
11
+if ( ! isset( $frm_style ) ) {
12 12
     $frm_style = new FrmStyle();
13 13
 }
14 14
 
15 15
 $styles = $frm_style->get_all();
16
-$default_style = $frm_style->get_default_style($styles);
16
+$default_style = $frm_style->get_default_style( $styles );
17 17
 $defaults = $default_style->post_content;
18 18
 ?>
19 19
 
@@ -182,8 +182,8 @@  discard block
 block discarded – undo
182 182
 
183 183
 <?php
184 184
 foreach ( $styles as $style ) {
185
-    include(dirname(__FILE__) .'/_single_theme.css.php');
186
-    unset($style);
185
+    include( dirname( __FILE__ ) . '/_single_theme.css.php' );
186
+    unset( $style );
187 187
 }
188 188
 ?>
189 189
 
@@ -619,7 +619,7 @@  discard block
 block discarded – undo
619 619
     clear:both;
620 620
 }
621 621
 
622
-<?php include( dirname(__FILE__) . '/frm_grids.css' ); ?>
622
+<?php include( dirname( __FILE__ ) . '/frm_grids.css' ); ?>
623 623
 
624 624
 /* Left and right label styling for non-Formidable styling - very basic, not responsive */
625 625
 .frm_form_field.frm_left_container label.frm_primary_label{
@@ -975,7 +975,7 @@  discard block
 block discarded – undo
975 975
     -moz-border-radius:<?php echo $defaults['border_radius'] ?>;
976 976
     -webkit-border-radius:<?php echo $defaults['border_radius'] ?>;
977 977
     border-radius:<?php echo $defaults['border_radius'] ?>;
978
-    width:<?php echo ($defaults['field_width'] == '' ? 'auto' : $defaults['field_width']) ?>;
978
+    width:<?php echo ( $defaults['field_width'] == '' ? 'auto' : $defaults['field_width'] ) ?>;
979 979
     max-width:100%;
980 980
     font-size:<?php echo $defaults['field_font_size'] ?>;
981 981
     padding:<?php echo $defaults['field_pad'] ?>;
@@ -1548,7 +1548,7 @@  discard block
 block discarded – undo
1548 1548
 	font-style:normal;
1549 1549
 }
1550 1550
 
1551
-<?php include(FrmAppHelper::plugin_path() .'/css/font_icons.css'); ?>
1551
+<?php include( FrmAppHelper::plugin_path() . '/css/font_icons.css' ); ?>
1552 1552
 
1553 1553
 /* Responsive */
1554 1554
 @media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min-resolution: 144dpi){
Please login to merge, or discard this patch.
deprecated.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 
3 3
 // 2.0
4 4
 if ( ! isset($frm_vars['pro_is_installed']) ) {
5
-    $frm_vars['pro_is_installed'] = false;
5
+	$frm_vars['pro_is_installed'] = false;
6 6
 }
7 7
 
8 8
 // Instansiate Models
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 // 2.0
4
-if ( ! isset($frm_vars['pro_is_installed']) ) {
4
+if ( ! isset( $frm_vars['pro_is_installed'] ) ) {
5 5
     $frm_vars['pro_is_installed'] = false;
6 6
 }
7 7
 
Please login to merge, or discard this patch.
formidable.php 2 patches
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -23,41 +23,41 @@  discard block
 block discarded – undo
23 23
 
24 24
 global $frm_vars;
25 25
 $frm_vars = array(
26
-    'load_css' => false, 'forms_loaded' => array(),
27
-    'created_entries'   => array(),
28
-    'pro_is_authorized' => false,
26
+	'load_css' => false, 'forms_loaded' => array(),
27
+	'created_entries'   => array(),
28
+	'pro_is_authorized' => false,
29 29
 );
30 30
 
31 31
 function frm_forms_autoloader( $class_name ) {
32
-    // Only load Frm classes here
32
+	// Only load Frm classes here
33 33
 	if ( ! preg_match( '/^Frm.+$/', $class_name ) ) {
34
-        return;
35
-    }
34
+		return;
35
+	}
36 36
 
37
-    $filepath = dirname(__FILE__);
37
+	$filepath = dirname(__FILE__);
38 38
 	if ( preg_match( '/^FrmPro.+$/', $class_name ) || 'FrmUpdatesController' == $class_name ) {
39
-        $filepath .= '/pro';
40
-    }
41
-    $filepath .= '/classes';
39
+		$filepath .= '/pro';
40
+	}
41
+	$filepath .= '/classes';
42 42
 
43 43
 	if ( preg_match( '/^.+Helper$/', $class_name ) ) {
44
-        $filepath .= '/helpers/';
44
+		$filepath .= '/helpers/';
45 45
 	} else if ( preg_match( '/^.+Controller$/', $class_name ) ) {
46
-        $filepath .= '/controllers/';
47
-    } else {
48
-        $filepath .= '/models/';
49
-    }
46
+		$filepath .= '/controllers/';
47
+	} else {
48
+		$filepath .= '/models/';
49
+	}
50 50
 
51
-    $filepath .= $class_name .'.php';
51
+	$filepath .= $class_name .'.php';
52 52
 
53
-    if ( file_exists($filepath) ) {
54
-        include($filepath);
55
-    }
53
+	if ( file_exists($filepath) ) {
54
+		include($filepath);
55
+	}
56 56
 }
57 57
 
58 58
 // if __autoload is active, put it on the spl_autoload stack
59 59
 if ( is_array(spl_autoload_functions()) && in_array( '__autoload', spl_autoload_functions()) ) {
60
-    spl_autoload_register('__autoload');
60
+	spl_autoload_register('__autoload');
61 61
 }
62 62
 
63 63
 // Add the autoloader
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 
66 66
 $frm_path = dirname(__FILE__);
67 67
 if ( file_exists($frm_path . '/pro/formidable-pro.php') ) {
68
-    include($frm_path .'/pro/formidable-pro.php');
68
+	include($frm_path .'/pro/formidable-pro.php');
69 69
 }
70 70
 
71 71
 FrmHooksController::trigger_load_hook();
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
         return;
35 35
     }
36 36
 
37
-    $filepath = dirname(__FILE__);
37
+    $filepath = dirname( __FILE__ );
38 38
 	if ( preg_match( '/^FrmPro.+$/', $class_name ) || 'FrmUpdatesController' == $class_name ) {
39 39
         $filepath .= '/pro';
40 40
     }
@@ -48,27 +48,27 @@  discard block
 block discarded – undo
48 48
         $filepath .= '/models/';
49 49
     }
50 50
 
51
-    $filepath .= $class_name .'.php';
51
+    $filepath .= $class_name . '.php';
52 52
 
53
-    if ( file_exists($filepath) ) {
54
-        include($filepath);
53
+    if ( file_exists( $filepath ) ) {
54
+        include( $filepath );
55 55
     }
56 56
 }
57 57
 
58 58
 // if __autoload is active, put it on the spl_autoload stack
59
-if ( is_array(spl_autoload_functions()) && in_array( '__autoload', spl_autoload_functions()) ) {
60
-    spl_autoload_register('__autoload');
59
+if ( is_array( spl_autoload_functions() ) && in_array( '__autoload', spl_autoload_functions() ) ) {
60
+    spl_autoload_register( '__autoload' );
61 61
 }
62 62
 
63 63
 // Add the autoloader
64
-spl_autoload_register('frm_forms_autoloader');
64
+spl_autoload_register( 'frm_forms_autoloader' );
65 65
 
66
-$frm_path = dirname(__FILE__);
67
-if ( file_exists($frm_path . '/pro/formidable-pro.php') ) {
68
-    include($frm_path .'/pro/formidable-pro.php');
66
+$frm_path = dirname( __FILE__ );
67
+if ( file_exists( $frm_path . '/pro/formidable-pro.php' ) ) {
68
+    include( $frm_path . '/pro/formidable-pro.php' );
69 69
 }
70 70
 
71 71
 FrmHooksController::trigger_load_hook();
72 72
 
73
-include_once($frm_path .'/deprecated.php');
74
-unset($frm_path);
73
+include_once( $frm_path . '/deprecated.php' );
74
+unset( $frm_path );
Please login to merge, or discard this patch.
classes/helpers/FrmFormActionsHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-if ( ! defined('ABSPATH') ) {
2
+if ( ! defined( 'ABSPATH' ) ) {
3 3
 	die( 'You are not allowed to call this page directly.' );
4 4
 }
5 5
 
Please login to merge, or discard this patch.
classes/views/frm-forms/add_field.php 2 patches
Indentation   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 $display = apply_filters('frm_display_field_options', array(
4
-    'type' => $field['type'], 'field_data' => $field,
5
-    'required' => true, 'unique' => false, 'read_only' => false,
6
-    'description' => true, 'options' => true, 'label_position' => true,
7
-    'invalid' => false, 'size' => false, 'clear_on_focus' => false,
8
-    'default_blank' => true, 'css' => true, 'conf_field' => false,
4
+	'type' => $field['type'], 'field_data' => $field,
5
+	'required' => true, 'unique' => false, 'read_only' => false,
6
+	'description' => true, 'options' => true, 'label_position' => true,
7
+	'invalid' => false, 'size' => false, 'clear_on_focus' => false,
8
+	'default_blank' => true, 'css' => true, 'conf_field' => false,
9 9
 	'max' => true, 'captcha_size' => false,
10 10
 ));
11 11
 
@@ -25,19 +25,19 @@  discard block
 block discarded – undo
25 25
 $frm_settings = FrmAppHelper::get_settings();
26 26
 
27 27
 if ( ! isset( $frm_all_field_selection ) ) {
28
-    if ( isset($frm_field_selection) && isset($pro_field_selection) ) {
29
-        $frm_all_field_selection = array_merge($frm_field_selection, $pro_field_selection);
30
-    } else {
28
+	if ( isset($frm_field_selection) && isset($pro_field_selection) ) {
29
+		$frm_all_field_selection = array_merge($frm_field_selection, $pro_field_selection);
30
+	} else {
31 31
 		$pro_field_selection = FrmField::pro_field_selection();
32 32
 		$frm_all_field_selection = array_merge( FrmField::field_selection(), $pro_field_selection );
33
-    }
33
+	}
34 34
 }
35 35
 
36 36
 $disabled_fields = FrmAppHelper::pro_is_installed() ? array() : $pro_field_selection;
37 37
 
38 38
 
39 39
 if ( ! isset( $ajax ) ) {
40
-    $li_classes .= ' ui-state-default widgets-holder-wrap'; ?>
40
+	$li_classes .= ' ui-state-default widgets-holder-wrap'; ?>
41 41
 <li id="frm_field_id_<?php echo esc_attr( $field['id'] ); ?>" class="<?php echo esc_attr( $li_classes ) ?>" data-fid="<?php echo esc_attr( $field['id'] ) ?>" data-formid="<?php echo ( 'divider' == $field['type'] ) ? esc_attr( $field['form_select'] ) : esc_attr( $field['form_id'] ); ?>">
42 42
 <?php
43 43
 }
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
     </span>
60 60
     <?php }
61 61
 
62
-    ?>
62
+	?>
63 63
     <label class="<?php echo ( $field['type'] == 'end_divider' ) ? '' : 'frm_ipe_field_label'; ?> frm_primary_label <?php echo ( $field['type'] == 'break' ) ? 'button': ''; ?>" id="field_label_<?php echo esc_attr( $field['id'] ); ?>"><?php echo ( $field['name'] == '' ) ? __( '(no label)', 'formidable' ) : force_balance_tags( $field['name'] ); ?></label>
64 64
 
65 65
 
@@ -105,8 +105,8 @@  discard block
 block discarded – undo
105 105
 if ( in_array( $field['type'], array( 'select', 'radio', 'checkbox' ) ) ) { ?>
106 106
     <div class="frm-show-click frm_small_top_margin"><?php
107 107
 
108
-    if ( isset($field['post_field']) && $field['post_field'] == 'post_category' ) {
109
-        echo '<p class="howto">'. FrmFieldsHelper::get_term_link($field['taxonomy']) .'</p>';
108
+	if ( isset($field['post_field']) && $field['post_field'] == 'post_category' ) {
109
+		echo '<p class="howto">'. FrmFieldsHelper::get_term_link($field['taxonomy']) .'</p>';
110 110
 	} else if ( ! isset( $field['post_field'] ) || ! in_array( $field['post_field'], array( 'post_category' ) ) ) {
111 111
 ?>
112 112
         <div id="frm_add_field_<?php echo esc_attr( $field['id'] ); ?>">
@@ -117,14 +117,14 @@  discard block
 block discarded – undo
117 117
 				<a href="javascript:void(0);" id="other_button_<?php echo esc_attr( $field['id'] ); ?>" data-opttype="other" data-ftype="<?php echo esc_attr( $field['type'] ) ?>" class="button frm_cb_button frm_add_opt<?php echo ( in_array( $field['type'], array( 'radio', 'select' ) ) && $field['other'] == true ? ' frm_hidden' : '' ); ?>"><?php _e( 'Add "Other"', 'formidable' ) ?></a>
118 118
                 <input type="hidden" value="<?php echo esc_attr( $field['other'] ); ?>" id="other_input_<?php echo esc_attr( $field['id'] ); ?>" name="field_options[other_<?php echo esc_attr( $field['id'] ); ?>]">
119 119
             <?php
120
-            }
120
+			}
121 121
 
122
-            if ( ! isset($field['post_field']) || $field['post_field'] != 'post_category' ) { ?>
122
+			if ( ! isset($field['post_field']) || $field['post_field'] != 'post_category' ) { ?>
123 123
             <a href="<?php echo esc_url(admin_url('admin-ajax.php') .'?action=frm_import_choices&field_id='. $field['id'] .'&TB_iframe=1') ?>" title="<?php echo FrmAppHelper::truncate(esc_attr(strip_tags(str_replace('"', '&quot;', $field['name']))), 20) . ' '. __( 'Field Choices', 'formidable' ); ?>" class="thickbox frm_orange"><?php _e( 'Bulk Edit Options', 'formidable' ) ?></a>
124 124
             <?php } ?>
125 125
         </div>
126 126
 <?php
127
-    }
127
+	}
128 128
 ?>
129 129
     </div>
130 130
 <?php
@@ -156,28 +156,28 @@  discard block
 block discarded – undo
156 156
 				if ( $display['required'] ) { ?>
157 157
                     <label for="frm_req_field_<?php echo esc_attr( $field['id'] ) ?>" class="frm_inline_label"><input type="checkbox" id="frm_req_field_<?php echo esc_attr( $field['id'] ) ?>" class="frm_req_field" name="field_options[required_<?php echo esc_attr( $field['id'] ) ?>]" value="1" <?php echo $field['required'] ? 'checked="checked"': ''; ?> /> <?php _e( 'Required', 'formidable' ) ?></label>
158 158
                 <?php
159
-                }
159
+				}
160 160
 
161 161
 				if ( $display['unique'] ) {
162
-                    if ( ! isset( $field['unique'] ) ) {
163
-                        $field['unique'] = false;
164
-                    }
165
-                ?>
162
+					if ( ! isset( $field['unique'] ) ) {
163
+						$field['unique'] = false;
164
+					}
165
+				?>
166 166
                 <label for="frm_uniq_field_<?php echo esc_attr( $field['id'] ) ?>" class="frm_inline_label frm_help" title="<?php esc_attr_e( 'Unique: Do not allow the same response multiple times. For example, if one user enters \'Joe\', then no one else will be allowed to enter the same name.', 'formidable' ) ?>"><input type="checkbox" name="field_options[unique_<?php echo esc_attr( $field['id'] ) ?>]" id="frm_uniq_field_<?php echo esc_attr( $field['id'] ) ?>" value="1" <?php checked( $field['unique'], 1 ); ?> class="frm_mark_unique" /> <?php _e( 'Unique', 'formidable' ) ?></label>
167 167
                 <?php
168
-                }
168
+				}
169 169
 
170 170
 				if ( $display['read_only'] ) {
171
-                    if ( ! isset( $field['read_only'] ) ) {
172
-                        $field['read_only'] = false;
171
+					if ( ! isset( $field['read_only'] ) ) {
172
+						$field['read_only'] = false;
173 173
 					}
174
-                ?>
174
+				?>
175 175
                 <label for="frm_read_only_field_<?php echo esc_attr( $field['id'] ) ?>" class="frm_inline_label frm_help" title="<?php esc_attr_e( 'Read Only: Show this field but do not allow the field value to be edited from the front-end.', 'formidable' ) ?>" ><input type="checkbox" id="frm_read_only_field_<?php echo esc_attr( $field['id'] ) ?>" name="field_options[read_only_<?php echo esc_attr( $field['id'] ) ?>]" value="1" <?php echo $field['read_only'] ? ' checked="checked"' : ''; ?>/> <?php _e( 'Read Only', 'formidable' ) ?></label>
176 176
                 <?php }
177 177
 
178
-                do_action('frm_field_options_form_top', $field, $display, $values);
178
+				do_action('frm_field_options_form_top', $field, $display, $values);
179 179
 
180
-                ?>
180
+				?>
181 181
                 <?php
182 182
 				if ( $display['required'] ) { ?>
183 183
                 <div class="frm_required_details<?php echo esc_attr( $field['id'] . ( $field['required'] ? '' : ' frm_hidden' ) ); ?>">
@@ -233,14 +233,14 @@  discard block
 block discarded – undo
233 233
 									<?php _e( 'automatic width', 'formidable' ) ?>
234 234
 								</label>
235 235
                             <?php
236
-                            }
236
+							}
237 237
 						} else { ?>
238 238
                                 <input type="text" name="field_options[size_<?php echo esc_attr( $field['id'] ) ?>]" value="<?php echo esc_attr( $field['size'] ); ?>" size="5" /> <span class="howto"><?php _e( 'pixels wide', 'formidable' ) ?></span>
239 239
 
240 240
 								<?php if ( $display['max'] ) { ?>
241 241
                                 <input type="text" name="field_options[max_<?php echo esc_attr( $field['id'] ) ?>]" value="<?php echo esc_attr( $field['max'] ); ?>" size="5" /> <span class="howto"><?php echo ( $field['type'] == 'textarea' || $field['type'] == 'rte' ) ? __( 'rows high', 'formidable' ) : __( 'characters maximum', 'formidable' ) ?></span>
242 242
                         <?php	}
243
-                        } ?>
243
+						} ?>
244 244
                         </td>
245 245
                     </tr>
246 246
                 <?php }
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
 				} ?>
259 259
                 <?php do_action('frm_field_options_form', $field, $display, $values);
260 260
 
261
-                if ( $display['required'] || $display['invalid'] || $display['unique'] || $display['conf_field'] ) { ?>
261
+				if ( $display['required'] || $display['invalid'] || $display['unique'] || $display['conf_field'] ) { ?>
262 262
 					<tr class="frm_validation_msg <?php echo ($display['invalid'] || $field['required'] || FrmField::is_option_true( $field, 'unique' ) || FrmField::is_option_true( $field, 'conf_field' ) ) ? '' : 'frm_hidden'; ?>">
263 263
 					<td colspan="2">
264 264
                     <div class="menu-settings">
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
                             <input type="text" name="field_options[blank_<?php echo esc_attr( $field['id'] ) ?>]" value="<?php echo esc_attr( $field['blank'] ); ?>" />
272 272
                         </p>
273 273
                         <?php
274
-                        }
274
+						}
275 275
 
276 276
 						if ( $display['invalid'] ) { ?>
277 277
                             <p><label><?php _e( 'Invalid Format', 'formidable' ) ?></label>
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
                             <input type="text" name="field_options[unique_msg_<?php echo esc_attr( $field['id'] ) ?>]" value="<?php echo esc_attr( $field['unique_msg'] ); ?>" />
287 287
                         </p>
288 288
                         <?php
289
-                        }
289
+						}
290 290
 
291 291
 						if ( $display['conf_field'] ) { ?>
292 292
                         <p class="frm_conf_details<?php echo esc_attr( $field['id'] . ( $field['conf_field'] ? '' : ' frm_hidden' ) ); ?>">
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
                             <input type="text" name="field_options[conf_msg_<?php echo esc_attr( $field['id'] ) ?>]" value="<?php echo esc_attr( $field['conf_msg'] ); ?>" />
295 295
                         </p>
296 296
                         <?php
297
-                        } ?>
297
+						} ?>
298 298
                     </div>
299 299
                     </div>
300 300
                     </td>
Please login to merge, or discard this patch.
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -1,22 +1,22 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-$display = apply_filters('frm_display_field_options', array(
3
+$display = apply_filters( 'frm_display_field_options', array(
4 4
     'type' => $field['type'], 'field_data' => $field,
5 5
     'required' => true, 'unique' => false, 'read_only' => false,
6 6
     'description' => true, 'options' => true, 'label_position' => true,
7 7
     'invalid' => false, 'size' => false, 'clear_on_focus' => false,
8 8
     'default_blank' => true, 'css' => true, 'conf_field' => false,
9 9
 	'max' => true, 'captcha_size' => false,
10
-));
10
+) );
11 11
 
12
-$li_classes = 'form-field edit_form_item frm_field_box frm_top_container frm_not_divider edit_field_type_'. $display['type'];
13
-$li_classes = apply_filters('frm_build_field_class', $li_classes, $field );
12
+$li_classes = 'form-field edit_form_item frm_field_box frm_top_container frm_not_divider edit_field_type_' . $display['type'];
13
+$li_classes = apply_filters( 'frm_build_field_class', $li_classes, $field );
14 14
 
15 15
 if ( isset( $values ) && isset( $values['ajax_load'] ) && $values['ajax_load'] && isset( $count ) && $count > 10 && ! in_array( $field['type'], array( 'divider', 'end_divider' ) ) ) {
16 16
 ?>
17 17
 <li id="frm_field_id_<?php echo esc_attr( $field['id'] ); ?>" class="<?php echo esc_attr( $li_classes ) ?> frm_field_loading" data-fid="<?php echo esc_attr( $field['id'] ) ?>" data-formid="<?php echo esc_attr( 'divider' == $field['type'] ? $field['form_select'] : $field['form_id'] ); ?>" data-ftype="<?php echo esc_attr( $display['type'] ) ?>">
18 18
 <img src="<?php echo FrmAppHelper::plugin_url() ?>/images/ajax_loader.gif" alt="<?php esc_attr_e( 'Loading', 'formidable' ) ?>" />
19
-<span class="frm_hidden_fdata frm_hidden"><?php echo htmlspecialchars(json_encode($field)) ?></span>
19
+<span class="frm_hidden_fdata frm_hidden"><?php echo htmlspecialchars( json_encode( $field ) ) ?></span>
20 20
 </li>
21 21
 <?php
22 22
    return;
@@ -25,8 +25,8 @@  discard block
 block discarded – undo
25 25
 $frm_settings = FrmAppHelper::get_settings();
26 26
 
27 27
 if ( ! isset( $frm_all_field_selection ) ) {
28
-    if ( isset($frm_field_selection) && isset($pro_field_selection) ) {
29
-        $frm_all_field_selection = array_merge($frm_field_selection, $pro_field_selection);
28
+    if ( isset( $frm_field_selection ) && isset( $pro_field_selection ) ) {
29
+        $frm_all_field_selection = array_merge( $frm_field_selection, $pro_field_selection );
30 30
     } else {
31 31
 		$pro_field_selection = FrmField::pro_field_selection();
32 32
 		$frm_all_field_selection = array_merge( FrmField::field_selection(), $pro_field_selection );
@@ -51,8 +51,8 @@  discard block
 block discarded – undo
51 51
     <a href="javascript:void(0);" class="frm_bstooltip alignright frm-show-hover frm-move frm-hover-icon frm_icon_font frm_move_icon" title="<?php esc_attr_e( 'Move Field', 'formidable' ) ?>"> </a>
52 52
     <a href="#" class="frm_bstooltip alignright frm-show-hover frm-hover-icon frm_icon_font frm_delete_icon frm_delete_field" title="<?php esc_attr_e( 'Delete Field', 'formidable' ) ?>"> </a>
53 53
     <a href="#" class="frm_bstooltip alignright frm-show-hover frm-hover-icon frm_icon_font frm_duplicate_icon" title="<?php ( $field['type'] == 'divider' ) ? esc_attr_e( 'Duplicate Section', 'formidable' ) : esc_attr_e( 'Duplicate Field', 'formidable' ) ?>"> </a>
54
-    <input type="hidden" name="frm_fields_submitted[]" value="<?php echo esc_attr($field['id']) ?>" />
55
-    <?php do_action('frm_extra_field_actions', $field['id']); ?>
54
+    <input type="hidden" name="frm_fields_submitted[]" value="<?php echo esc_attr( $field['id'] ) ?>" />
55
+    <?php do_action( 'frm_extra_field_actions', $field['id'] ); ?>
56 56
     <?php if ( $display['required'] ) { ?>
57 57
     <span id="require_field_<?php echo esc_attr( $field['id'] ); ?>">
58 58
 		<a href="javascript:void(0);" class="frm_req_field frm_action_icon frm_required_icon frm_icon_font alignleft frm_required<?php echo (int) $field['required'] ?>" id="req_field_<?php echo esc_attr( $field['id'] ); ?>" title="Click to Mark as <?php echo FrmField::is_required( $field ) ? 'not ' : ''; ?>Required"></a>
@@ -60,13 +60,13 @@  discard block
 block discarded – undo
60 60
     <?php }
61 61
 
62 62
     ?>
63
-    <label class="<?php echo ( $field['type'] == 'end_divider' ) ? '' : 'frm_ipe_field_label'; ?> frm_primary_label <?php echo ( $field['type'] == 'break' ) ? 'button': ''; ?>" id="field_label_<?php echo esc_attr( $field['id'] ); ?>"><?php echo ( $field['name'] == '' ) ? __( '(no label)', 'formidable' ) : force_balance_tags( $field['name'] ); ?></label>
63
+    <label class="<?php echo ( $field['type'] == 'end_divider' ) ? '' : 'frm_ipe_field_label'; ?> frm_primary_label <?php echo ( $field['type'] == 'break' ) ? 'button' : ''; ?>" id="field_label_<?php echo esc_attr( $field['id'] ); ?>"><?php echo ( $field['name'] == '' ) ? __( '(no label)', 'formidable' ) : force_balance_tags( $field['name'] ); ?></label>
64 64
 
65 65
 
66 66
 <div id="field_<?php echo esc_attr( $field['id'] ) ?>_inner_container" class="frm_inner_field_container">
67 67
 <div class="frm_form_fields" data-ftype="<?php echo esc_attr( $display['type'] ) ?>">
68 68
 <?php
69
-include(FrmAppHelper::plugin_path() .'/classes/views/frm-fields/show-build.php');
69
+include( FrmAppHelper::plugin_path() . '/classes/views/frm-fields/show-build.php' );
70 70
 
71 71
 if ( $display['clear_on_focus'] ) {
72 72
 	FrmFieldsHelper::clear_on_focus_html( $field, $display );
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 </div>
79 79
 <?php
80 80
 if ( $display['description'] ) { ?>
81
-    <div class="frm_ipe_field_desc description <?php echo ($field['description'] == '') ? 'frm-show-click' : '' ?>" id="field_description_<?php echo esc_attr( $field['id'] ); ?>"><?php echo ($field['description'] == '') ? __( '(Click to add description)', 'formidable' ) : force_balance_tags( $field['description'] ); ?></div>
81
+    <div class="frm_ipe_field_desc description <?php echo ( $field['description'] == '' ) ? 'frm-show-click' : '' ?>" id="field_description_<?php echo esc_attr( $field['id'] ); ?>"><?php echo ( $field['description'] == '' ) ? __( '(Click to add description)', 'formidable' ) : force_balance_tags( $field['description'] ); ?></div>
82 82
     <input type="hidden" name="field_options[description_<?php echo esc_attr( $field['id'] ) ?>]" value="<?php echo esc_attr( $field['description'] ); ?>" />
83 83
 
84 84
 <?php } ?>
@@ -88,9 +88,9 @@  discard block
 block discarded – undo
88 88
 <div id="frm_conf_field_<?php echo esc_attr( $field['id'] ) ?>_container" class="frm_conf_field_container frm_form_fields frm_conf_details<?php echo esc_attr( $field['id'] . ( $field['conf_field'] ? '' : ' frm_hidden' ) ); ?>">
89 89
     <div id="frm_conf_field_<?php echo esc_attr( $field['id'] ) ?>_inner_container" class="frm_inner_conf_container">
90 90
 		<div class="frm_form_fields">
91
-			<input type="text" id="conf_field_<?php echo esc_attr( $field['field_key'] ) ?>" name="field_options[conf_input_<?php echo esc_attr( $field['id'] ) ?>]" value="<?php echo esc_attr( $field['conf_input'] ); ?>" <?php do_action('frm_field_input_html', $field) ?> />
91
+			<input type="text" id="conf_field_<?php echo esc_attr( $field['field_key'] ) ?>" name="field_options[conf_input_<?php echo esc_attr( $field['id'] ) ?>]" value="<?php echo esc_attr( $field['conf_input'] ); ?>" <?php do_action( 'frm_field_input_html', $field ) ?> />
92 92
 		</div>
93
-    	<div class="frm_ipe_field_conf_desc description <?php echo ($field['conf_desc'] == '') ? 'frm-show-click' : '' ?>"><?php echo ($field['conf_desc'] == '') ? __( '(Click to add description)', 'formidable' ) : force_balance_tags($field['conf_desc']); ?></div>
93
+    	<div class="frm_ipe_field_conf_desc description <?php echo ( $field['conf_desc'] == '' ) ? 'frm-show-click' : '' ?>"><?php echo ( $field['conf_desc'] == '' ) ? __( '(Click to add description)', 'formidable' ) : force_balance_tags( $field['conf_desc'] ); ?></div>
94 94
     	<input type="hidden" name="field_options[conf_desc_<?php echo esc_attr( $field['id'] ) ?>]" value="<?php echo esc_attr( $field['conf_desc'] ); ?>" />
95 95
 </div>
96 96
 	<?php if ( $display['clear_on_focus'] ) { ?>
@@ -105,8 +105,8 @@  discard block
 block discarded – undo
105 105
 if ( in_array( $field['type'], array( 'select', 'radio', 'checkbox' ) ) ) { ?>
106 106
     <div class="frm-show-click frm_small_top_margin"><?php
107 107
 
108
-    if ( isset($field['post_field']) && $field['post_field'] == 'post_category' ) {
109
-        echo '<p class="howto">'. FrmFieldsHelper::get_term_link($field['taxonomy']) .'</p>';
108
+    if ( isset( $field['post_field'] ) && $field['post_field'] == 'post_category' ) {
109
+        echo '<p class="howto">' . FrmFieldsHelper::get_term_link( $field['taxonomy'] ) . '</p>';
110 110
 	} else if ( ! isset( $field['post_field'] ) || ! in_array( $field['post_field'], array( 'post_category' ) ) ) {
111 111
 ?>
112 112
         <div id="frm_add_field_<?php echo esc_attr( $field['id'] ); ?>">
@@ -119,8 +119,8 @@  discard block
 block discarded – undo
119 119
             <?php
120 120
             }
121 121
 
122
-            if ( ! isset($field['post_field']) || $field['post_field'] != 'post_category' ) { ?>
123
-            <a href="<?php echo esc_url( admin_url( 'admin-ajax.php?action=frm_import_choices&field_id='. $field['id'] .'&TB_iframe=1') ) ?>" title="<?php echo esc_attr( FrmAppHelper::truncate( strip_tags( str_replace( '"', '&quot;', $field['name'] ) ), 20 ) . ' '. __( 'Field Choices', 'formidable' ) ); ?>" class="thickbox frm_orange"><?php _e( 'Bulk Edit Options', 'formidable' ) ?></a>
122
+            if ( ! isset( $field['post_field'] ) || $field['post_field'] != 'post_category' ) { ?>
123
+            <a href="<?php echo esc_url( admin_url( 'admin-ajax.php?action=frm_import_choices&field_id=' . $field['id'] . '&TB_iframe=1' ) ) ?>" title="<?php echo esc_attr( FrmAppHelper::truncate( strip_tags( str_replace( '"', '&quot;', $field['name'] ) ), 20 ) . ' ' . __( 'Field Choices', 'formidable' ) ); ?>" class="thickbox frm_orange"><?php _e( 'Bulk Edit Options', 'formidable' ) ?></a>
124 124
             <?php } ?>
125 125
         </div>
126 126
 <?php
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 <?php
131 131
 }
132 132
 
133
-do_action('frm_before_field_options', $field);
133
+do_action( 'frm_before_field_options', $field );
134 134
 
135 135
 if ( $display['options'] ) { ?>
136 136
     <div class="widget">
@@ -140,13 +140,13 @@  discard block
 block discarded – undo
140 140
         </div>
141 141
     	<div class="widget-inside">
142 142
             <table class="form-table frm_clear_none">
143
-                <?php $field_types = FrmFieldsHelper::get_field_types($field['type']); ?>
143
+                <?php $field_types = FrmFieldsHelper::get_field_types( $field['type'] ); ?>
144 144
 				<tr><td class="frm_150_width"><label><?php _e( 'Field Type', 'formidable' ) ?></label></td>
145 145
                     <td>
146
-                <select <?php if ( count($field_types) == 1 ) { ?>disabled="disabled"<?php } else { ?>name="field_options[type_<?php echo esc_attr( $field['id'] ) ?>]"<?php } ?>>
146
+                <select <?php if ( count( $field_types ) == 1 ) { ?>disabled="disabled"<?php } else { ?>name="field_options[type_<?php echo esc_attr( $field['id'] ) ?>]"<?php } ?>>
147 147
                     <?php
148 148
 					foreach ( $field_types as $fkey => $ftype ) { ?>
149
-                        <option value="<?php echo esc_attr( $fkey ) ?>" <?php echo ( $fkey == $field['type'] ) ? ' selected="selected"' : ''; ?> <?php echo array_key_exists($fkey, $disabled_fields ) ? 'disabled="disabled"' : '';  ?>><?php echo is_array($ftype) ? $ftype['name'] : $ftype ?> </option>
149
+                        <option value="<?php echo esc_attr( $fkey ) ?>" <?php echo ( $fkey == $field['type'] ) ? ' selected="selected"' : ''; ?> <?php echo array_key_exists( $fkey, $disabled_fields ) ? 'disabled="disabled"' : ''; ?>><?php echo is_array( $ftype ) ? $ftype['name'] : $ftype ?> </option>
150 150
                     <?php
151 151
 						unset( $fkey, $ftype );
152 152
 					} ?>
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
 
155 155
                 <?php
156 156
 				if ( $display['required'] ) { ?>
157
-                    <label for="frm_req_field_<?php echo esc_attr( $field['id'] ) ?>" class="frm_inline_label"><input type="checkbox" id="frm_req_field_<?php echo esc_attr( $field['id'] ) ?>" class="frm_req_field" name="field_options[required_<?php echo esc_attr( $field['id'] ) ?>]" value="1" <?php echo $field['required'] ? 'checked="checked"': ''; ?> /> <?php _e( 'Required', 'formidable' ) ?></label>
157
+                    <label for="frm_req_field_<?php echo esc_attr( $field['id'] ) ?>" class="frm_inline_label"><input type="checkbox" id="frm_req_field_<?php echo esc_attr( $field['id'] ) ?>" class="frm_req_field" name="field_options[required_<?php echo esc_attr( $field['id'] ) ?>]" value="1" <?php echo $field['required'] ? 'checked="checked"' : ''; ?> /> <?php _e( 'Required', 'formidable' ) ?></label>
158 158
                 <?php
159 159
                 }
160 160
 
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
                 <label for="frm_read_only_field_<?php echo esc_attr( $field['id'] ) ?>" class="frm_inline_label frm_help" title="<?php esc_attr_e( 'Read Only: Show this field but do not allow the field value to be edited from the front-end.', 'formidable' ) ?>" ><input type="checkbox" id="frm_read_only_field_<?php echo esc_attr( $field['id'] ) ?>" name="field_options[read_only_<?php echo esc_attr( $field['id'] ) ?>]" value="1" <?php echo $field['read_only'] ? ' checked="checked"' : ''; ?>/> <?php _e( 'Read Only', 'formidable' ) ?></label>
176 176
                 <?php }
177 177
 
178
-                do_action('frm_field_options_form_top', $field, $display, $values);
178
+                do_action( 'frm_field_options_form_top', $field, $display, $values );
179 179
 
180 180
                 ?>
181 181
                 <?php
@@ -212,13 +212,13 @@  discard block
 block discarded – undo
212 212
 				if ( $display['label_position'] ) { ?>
213 213
                     <tr><td class="frm_150_width"><label><?php _e( 'Label Position', 'formidable' ) ?></label></td>
214 214
                         <td><select name="field_options[label_<?php echo esc_attr( $field['id'] ) ?>]">
215
-                            <option value=""<?php selected($field['label'], ''); ?>><?php _e( 'Default', 'formidable' ) ?></option>
216
-                            <option value="top"<?php selected($field['label'], 'top'); ?>><?php _e( 'Top', 'formidable' ) ?></option>
217
-                            <option value="left"<?php selected($field['label'], 'left'); ?>><?php _e( 'Left', 'formidable' ) ?></option>
218
-                            <option value="right"<?php selected($field['label'], 'right'); ?>><?php _e( 'Right', 'formidable' ) ?></option>
219
-                            <option value="inline"<?php selected($field['label'], 'inline'); ?>><?php _e( 'Inline (left without a set width)', 'formidable' ) ?></option>
220
-                            <option value="none"<?php selected($field['label'], 'none'); ?>><?php _e( 'None', 'formidable' ) ?></option>
221
-                            <option value="hidden"<?php selected($field['label'], 'hidden'); ?>><?php _e( 'Hidden (but leave the space)', 'formidable' ) ?></option>
215
+                            <option value=""<?php selected( $field['label'], '' ); ?>><?php _e( 'Default', 'formidable' ) ?></option>
216
+                            <option value="top"<?php selected( $field['label'], 'top' ); ?>><?php _e( 'Top', 'formidable' ) ?></option>
217
+                            <option value="left"<?php selected( $field['label'], 'left' ); ?>><?php _e( 'Left', 'formidable' ) ?></option>
218
+                            <option value="right"<?php selected( $field['label'], 'right' ); ?>><?php _e( 'Right', 'formidable' ) ?></option>
219
+                            <option value="inline"<?php selected( $field['label'], 'inline' ); ?>><?php _e( 'Inline (left without a set width)', 'formidable' ) ?></option>
220
+                            <option value="none"<?php selected( $field['label'], 'none' ); ?>><?php _e( 'None', 'formidable' ) ?></option>
221
+                            <option value="hidden"<?php selected( $field['label'], 'hidden' ); ?>><?php _e( 'Hidden (but leave the space)', 'formidable' ) ?></option>
222 222
                         </select>
223 223
                         </td>
224 224
                     </tr>
@@ -250,8 +250,8 @@  discard block
 block discarded – undo
250 250
 					<span class="frm_help frm_icon_font frm_tooltip_icon" title="<?php esc_attr_e( 'Set the size of the captcha field. The compact option is best if your form is in a small area.', 'formidable' ) ?>" ></span>
251 251
                     </td>
252 252
                     <td><select name="field_options[captcha_size_<?php echo esc_attr( $field['id'] ) ?>]">
253
-                        <option value="default"<?php selected($field['captcha_size'], 'default'); ?>><?php _e( 'Default', 'formidable' ) ?></option>
254
-                        <option value="compact"<?php selected($field['captcha_size'], 'compact'); ?>><?php _e( 'Compact', 'formidable' ) ?></option>
253
+                        <option value="default"<?php selected( $field['captcha_size'], 'default' ); ?>><?php _e( 'Default', 'formidable' ) ?></option>
254
+                        <option value="compact"<?php selected( $field['captcha_size'], 'compact' ); ?>><?php _e( 'Compact', 'formidable' ) ?></option>
255 255
                     </select>
256 256
                     </td>
257 257
                 </tr>
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
 				do_action( 'frm_field_options_form', $field, $display, $values );
263 263
 
264 264
                 if ( $display['required'] || $display['invalid'] || $display['unique'] || $display['conf_field'] ) { ?>
265
-					<tr class="frm_validation_msg <?php echo ($display['invalid'] || $field['required'] || FrmField::is_option_true( $field, 'unique' ) || FrmField::is_option_true( $field, 'conf_field' ) ) ? '' : 'frm_hidden'; ?>">
265
+					<tr class="frm_validation_msg <?php echo ( $display['invalid'] || $field['required'] || FrmField::is_option_true( $field, 'unique' ) || FrmField::is_option_true( $field, 'conf_field' ) ) ? '' : 'frm_hidden'; ?>">
266 266
 					<td colspan="2">
267 267
                     <div class="menu-settings">
268 268
                     <h3 class="frm_no_bg"><?php _e( 'Validation', 'formidable' ) ?></h3>
@@ -326,4 +326,4 @@  discard block
 block discarded – undo
326 326
 <?php
327 327
 }
328 328
 
329
-unset($display);
329
+unset( $display );
Please login to merge, or discard this patch.
classes/views/styles/show.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -64,8 +64,8 @@
 block discarded – undo
64 64
 							<a href="<?php echo esc_url( admin_url( 'admin.php?page=formidable-styles&frm_action=destroy&id=' . $style->ID ) ); ?>" id="frm_delete_style" class="submitdelete deletion" onclick="return confirm('<?php esc_attr_e( 'Are you sure you want to delete that style?', 'formidable' ) ?>')"><?php _e( 'Delete Style', 'formidable' ) ?></a>
65 65
 						    <?php } ?>
66 66
 						    <?php
67
-						    if ( $style->ID ) {
68
-							    echo '<span class="howto"><span>.frm_style_'. esc_attr( $style->post_name ) .'</span></span>';
67
+							if ( $style->ID ) {
68
+								echo '<span class="howto"><span>.frm_style_'. esc_attr( $style->post_name ) .'</span></span>';
69 69
 							} ?>
70 70
                             <div class="publishing-action">
71 71
                                 <input type="button" value="<?php esc_attr_e( 'Reset to Default', 'formidable' ) ?>" class="button-secondary frm_reset_style" />
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -2,14 +2,14 @@  discard block
 block discarded – undo
2 2
 <div class="wrap">
3 3
     <?php FrmStylesHelper::style_menu(); ?>
4 4
 
5
-	<?php include(FrmAppHelper::plugin_path() .'/classes/views/shared/errors.php'); ?>
5
+	<?php include( FrmAppHelper::plugin_path() . '/classes/views/shared/errors.php' ); ?>
6 6
 
7 7
 	<?php do_action( 'frm_style_switcher', $style, $styles ) ?>
8 8
 
9 9
 	<form id="frm_styling_form" action="" name="frm_styling_form" method="post">
10 10
 	    <input type="hidden" name="ID" value="<?php echo esc_attr( $style->ID ) ?>" />
11 11
 		<input type="hidden" name="frm_action" value="save" />
12
-        <textarea name="<?php echo esc_attr( $frm_style->get_field_name('custom_css') ) ?>" class="frm_hidden"><?php echo FrmAppHelper::esc_textarea( $style->post_content['custom_css'] ) ?></textarea>
12
+        <textarea name="<?php echo esc_attr( $frm_style->get_field_name( 'custom_css' ) ) ?>" class="frm_hidden"><?php echo FrmAppHelper::esc_textarea( $style->post_content['custom_css'] ) ?></textarea>
13 13
 		<?php wp_nonce_field( 'frm_style_nonce', 'frm_style' ); ?>
14 14
 
15 15
 	<div id="nav-menus-frame">
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 
19 19
 		<div class="styling_settings">
20 20
 		    <input type="hidden" name="style_name" value="frm_style_<?php echo esc_attr( $style->post_name ) ?>" />
21
-			<?php FrmStylesController::do_accordion_sections( FrmStylesController::$screen, 'side', compact('style', 'frm_style') ); ?>
21
+			<?php FrmStylesController::do_accordion_sections( FrmStylesController::$screen, 'side', compact( 'style', 'frm_style' ) ); ?>
22 22
 		</div>
23 23
 
24 24
 	</div><!-- /#menu-settings-column -->
@@ -31,17 +31,17 @@  discard block
 block discarded – undo
31 31
 						<div class="major-publishing-actions">
32 32
 							<label class="menu-name-label howto open-label" for="menu-name">
33 33
 								<span><?php _e( 'Style Name', 'formidable' ) ?></span>
34
-								<input id="menu-name" name="<?php echo esc_attr( $frm_style->get_field_name('post_title', '') ); ?>" type="text" class="menu-name regular-text menu-item-textbox" title="<?php esc_attr_e( 'Enter style name here', 'formidable' ) ?>" value="<?php echo esc_attr( $style->post_title ) ?>" />
34
+								<input id="menu-name" name="<?php echo esc_attr( $frm_style->get_field_name( 'post_title', '' ) ); ?>" type="text" class="menu-name regular-text menu-item-textbox" title="<?php esc_attr_e( 'Enter style name here', 'formidable' ) ?>" value="<?php echo esc_attr( $style->post_title ) ?>" />
35 35
 							</label>
36 36
 
37
-							<input name="prev_menu_order" type="hidden" value="<?php echo esc_attr($style->menu_order) ?>" />
37
+							<input name="prev_menu_order" type="hidden" value="<?php echo esc_attr( $style->menu_order ) ?>" />
38 38
 							<label class="menu-name-label howto open-label default-style-box" for="menu_order">
39 39
 							<span>
40 40
 							<?php if ( $style->menu_order ) { ?>
41
-							    <input name="<?php echo esc_attr( $frm_style->get_field_name('menu_order', '') ); ?>" type="hidden" value="1" />
42
-							    <input id="menu_order" disabled="disabled" type="checkbox" value="1" <?php checked($style->menu_order, 1) ?> />
41
+							    <input name="<?php echo esc_attr( $frm_style->get_field_name( 'menu_order', '' ) ); ?>" type="hidden" value="1" />
42
+							    <input id="menu_order" disabled="disabled" type="checkbox" value="1" <?php checked( $style->menu_order, 1 ) ?> />
43 43
 							<?php } else { ?>
44
-								<input id="menu_order" name="<?php echo esc_attr( $frm_style->get_field_name('menu_order', '') ); ?>" type="checkbox" value="1" <?php checked($style->menu_order, 1) ?> />
44
+								<input id="menu_order" name="<?php echo esc_attr( $frm_style->get_field_name( 'menu_order', '' ) ); ?>" type="checkbox" value="1" <?php checked( $style->menu_order, 1 ) ?> />
45 45
 							<?php } ?>
46 46
 							    <?php _e( 'Make default style', 'formidable' ) ?></span>
47 47
 							</label>
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 					<div id="post-body">
55 55
 						<div id="post-body-content">
56 56
 
57
-							<?php include( dirname(__FILE__) .'/_sample_form.php') ?>
57
+							<?php include( dirname( __FILE__ ) . '/_sample_form.php' ) ?>
58 58
 
59 59
 						</div><!-- /#post-body-content -->
60 60
 					</div><!-- /#post-body -->
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 						    <?php } ?>
66 66
 						    <?php
67 67
 						    if ( $style->ID ) {
68
-							    echo '<span class="howto"><span>.frm_style_'. esc_attr( $style->post_name ) .'</span></span>';
68
+							    echo '<span class="howto"><span>.frm_style_' . esc_attr( $style->post_name ) . '</span></span>';
69 69
 							} ?>
70 70
                             <div class="publishing-action">
71 71
                                 <input type="button" value="<?php esc_attr_e( 'Reset to Default', 'formidable' ) ?>" class="button-secondary frm_reset_style" />
Please login to merge, or discard this patch.