Completed
Branch 3.0 (864fc8)
by Stephanie
02:53
created
classes/views/frm-form-actions/_action_inside.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@  discard block
 block discarded – undo
1
-<input type="hidden" name="<?php echo esc_attr( $action_control->get_field_name('post_excerpt', '') ) ?>" class="frm_action_name" value="<?php echo esc_attr( $form_action->post_excerpt ); ?>" />
2
-<input type="hidden" name="<?php echo esc_attr( $action_control->get_field_name('ID', '') ) ?>" value="<?php echo esc_attr( $form_action->ID ); ?>" />
1
+<input type="hidden" name="<?php echo esc_attr( $action_control->get_field_name( 'post_excerpt', '' ) ) ?>" class="frm_action_name" value="<?php echo esc_attr( $form_action->post_excerpt ); ?>" />
2
+<input type="hidden" name="<?php echo esc_attr( $action_control->get_field_name( 'ID', '' ) ) ?>" value="<?php echo esc_attr( $form_action->ID ); ?>" />
3 3
 
4 4
 <table class="form-table">
5 5
     <tr>
6 6
         <th>
7
-            <label <?php FrmAppHelper::maybe_add_tooltip('action_title') ?>><?php _e( 'Label', 'formidable' ) ?></label>
7
+            <label <?php FrmAppHelper::maybe_add_tooltip( 'action_title' ) ?>><?php _e( 'Label', 'formidable' ) ?></label>
8 8
         </th>
9
-        <td><input type="text" name="<?php echo esc_attr( $action_control->get_field_name('post_title', '') ) ?>" value="<?php echo esc_attr($form_action->post_title); ?>" class="large-text <?php FrmAppHelper::maybe_add_tooltip('action_title', 'open') ?>" id="<?php echo esc_attr( $action_control->get_field_id('action_post_title') ) ?>" />
9
+        <td><input type="text" name="<?php echo esc_attr( $action_control->get_field_name( 'post_title', '' ) ) ?>" value="<?php echo esc_attr( $form_action->post_title ); ?>" class="large-text <?php FrmAppHelper::maybe_add_tooltip( 'action_title', 'open' ) ?>" id="<?php echo esc_attr( $action_control->get_field_id( 'action_post_title' ) ) ?>" />
10 10
         </td>
11 11
     </tr>
12 12
 </table>
13
-<?php $action_control->form($form_action, compact('form', 'action_key', 'values'));
13
+<?php $action_control->form( $form_action, compact( 'form', 'action_key', 'values' ) );
14 14
 
15 15
 if ( ! isset( $action_control->action_options['event'] ) ) {
16 16
 	$events = 'create';
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 
23 23
 if ( count( $action_control->action_options['event'] ) == 1 || $action_control->action_options['force_event'] ) {
24 24
 	foreach ( $action_control->action_options['event'] as $e ) { ?>
25
-	<input type="hidden" name="<?php echo esc_attr( $action_control->get_field_name('event') ) ?>[]" value="<?php echo esc_attr( $e ) ?>" />
25
+	<input type="hidden" name="<?php echo esc_attr( $action_control->get_field_name( 'event' ) ) ?>[]" value="<?php echo esc_attr( $e ) ?>" />
26 26
 <?php
27 27
 	}
28 28
 } else {
@@ -30,12 +30,12 @@  discard block
 block discarded – undo
30 30
 	<h3><?php _e( 'Action Triggers', 'formidable' ); ?></h3>
31 31
 	<p>
32 32
 		<label class="frm_left_label"><?php _e( 'Trigger this action after', 'formidable' ) ?></label>
33
-		<select name="<?php echo esc_attr( $action_control->get_field_name('event') ) ?>[]" multiple="multiple" class="frm_multiselect" id="<?php echo esc_attr( $action_control->get_field_id('event') ) ?>">
33
+		<select name="<?php echo esc_attr( $action_control->get_field_name( 'event' ) ) ?>[]" multiple="multiple" class="frm_multiselect" id="<?php echo esc_attr( $action_control->get_field_id( 'event' ) ) ?>">
34 34
 	<?php
35 35
 
36 36
 	$event_labels = FrmFormAction::trigger_labels();
37 37
 	foreach ( $action_control->action_options['event'] as $event ) { ?>
38
-		<option value="<?php echo esc_attr( $event ) ?>" <?php echo in_array( $event, (array) $form_action->post_content['event'] ) ? ' selected="selected"' : ''; ?> ><?php echo isset( $event_labels[ $event ] ) ? $event_labels[ $event ] : $event; ?></option>
38
+		<option value="<?php echo esc_attr( $event ) ?>" <?php echo in_array( $event, (array) $form_action->post_content['event'] ) ? ' selected="selected"' : ''; ?> ><?php echo isset( $event_labels[$event] ) ? $event_labels[$event] : $event; ?></option>
39 39
 <?php
40 40
 	}?>
41 41
 		</select>
@@ -47,5 +47,5 @@  discard block
 block discarded – undo
47 47
 do_action( 'frm_additional_action_settings', $form_action, $pass_args );
48 48
 
49 49
 ?>
50
-<span class="alignright frm_action_id <?php echo empty( $form_action->ID ) ? 'frm_hidden' : ''; ?>"><?php printf( __( 'Action ID: %1$s', 'formidable' ), $form_action->ID); ?></span>
50
+<span class="alignright frm_action_id <?php echo empty( $form_action->ID ) ? 'frm_hidden' : ''; ?>"><?php printf( __( 'Action ID: %1$s', 'formidable' ), $form_action->ID ); ?></span>
51 51
 <div style="clear:both;"></div>
Please login to merge, or discard this patch.
classes/helpers/FrmStylesHelper.php 2 patches
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
             'swanky-purse'  => 'Swanky Purse',
30 30
         );
31 31
 
32
-        $themes = apply_filters('frm_jquery_themes', $themes);
32
+        $themes = apply_filters( 'frm_jquery_themes', $themes );
33 33
         return $themes;
34 34
     }
35 35
 
@@ -40,12 +40,12 @@  discard block
 block discarded – undo
40 40
 
41 41
         if ( ! $theme_css || $theme_css == '' || $theme_css == 'ui-lightness' ) {
42 42
             $css_file = FrmAppHelper::plugin_url() . '/css/ui-lightness/jquery-ui.css';
43
-        } else if ( preg_match('/^http.?:\/\/.*\..*$/', $theme_css) ) {
43
+        } else if ( preg_match( '/^http.?:\/\/.*\..*$/', $theme_css ) ) {
44 44
             $css_file = $theme_css;
45 45
         } else {
46 46
             $uploads = self::get_upload_base();
47 47
 			$file_path = '/formidable/css/' . $theme_css . '/jquery-ui.css';
48
-            if ( file_exists($uploads['basedir'] . $file_path) ) {
48
+            if ( file_exists( $uploads['basedir'] . $file_path ) ) {
49 49
                 $css_file = $uploads['baseurl'] . $file_path;
50 50
             } else {
51 51
 				$css_file = FrmAppHelper::jquery_ui_base_url() . '/themes/' . $theme_css . '/jquery-ui.min.css';
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 		$form = self::get_form_for_page();
60 60
 		$theme_css = FrmStylesController::get_style_val( 'theme_css', $form );
61 61
         if ( $theme_css != -1 ) {
62
-            wp_enqueue_style('jquery-theme', self::jquery_css_url($theme_css), array(), FrmAppHelper::plugin_version());
62
+            wp_enqueue_style( 'jquery-theme', self::jquery_css_url( $theme_css ), array(), FrmAppHelper::plugin_version() );
63 63
         }
64 64
     }
65 65
 
@@ -79,8 +79,8 @@  discard block
 block discarded – undo
79 79
 
80 80
     public static function get_upload_base() {
81 81
         $uploads = wp_upload_dir();
82
-        if ( is_ssl() && ! preg_match('/^https:\/\/.*\..*$/', $uploads['baseurl']) ) {
83
-            $uploads['baseurl'] = str_replace('http://', 'https://', $uploads['baseurl']);
82
+        if ( is_ssl() && ! preg_match( '/^https:\/\/.*\..*$/', $uploads['baseurl'] ) ) {
83
+            $uploads['baseurl'] = str_replace( 'http://', 'https://', $uploads['baseurl'] );
84 84
         }
85 85
 
86 86
         return $uploads;
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
         <h2 class="nav-tab-wrapper">
92 92
 			<a href="<?php echo esc_url( admin_url( 'admin.php?page=formidable-styles' ) ) ?>" class="nav-tab <?php echo ( '' == $active ) ? 'nav-tab-active' : '' ?>"><?php _e( 'Edit Styles', 'formidable' ) ?></a>
93 93
 			<a href="<?php echo esc_url( admin_url( 'admin.php?page=formidable-styles&frm_action=manage' ) ) ?>" class="nav-tab <?php echo ( 'manage' == $active ) ? 'nav-tab-active' : '' ?>"><?php _e( 'Manage Form Styles', 'formidable' ) ?></a>
94
-			<a href="<?php echo esc_url( admin_url('admin.php?page=formidable-styles&frm_action=custom_css' ) ) ?>" class="nav-tab <?php echo ( 'custom_css' == $active ) ? 'nav-tab-active' : '' ?>"><?php _e( 'Custom CSS', 'formidable' ) ?></a>
94
+			<a href="<?php echo esc_url( admin_url( 'admin.php?page=formidable-styles&frm_action=custom_css' ) ) ?>" class="nav-tab <?php echo ( 'custom_css' == $active ) ? 'nav-tab-active' : '' ?>"><?php _e( 'Custom CSS', 'formidable' ) ?></a>
95 95
         </h2>
96 96
 <?php
97 97
     }
@@ -130,15 +130,15 @@  discard block
 block discarded – undo
130 130
      * @return The class for this icon
131 131
      */
132 132
 	public static function icon_key_to_class( $key, $icon = '+', $type = 'arrow' ) {
133
-        if ( 'arrow' == $type && is_numeric($key) ) {
133
+        if ( 'arrow' == $type && is_numeric( $key ) ) {
134 134
             //frm_arrowup6_icon
135 135
 			$arrow = array( '-' => 'down', '+' => 'up' );
136
-			$class = 'frm_arrow' . $arrow[ $icon ];
136
+			$class = 'frm_arrow' . $arrow[$icon];
137 137
         } else {
138 138
             //frm_minus1_icon
139
-            $key = str_replace('p', '', $key);
139
+            $key = str_replace( 'p', '', $key );
140 140
 			$plus = array( '-' => 'minus', '+' => 'plus' );
141
-			$class = 'frm_' . $plus[ $icon ];
141
+			$class = 'frm_' . $plus[$icon];
142 142
         }
143 143
 
144 144
         if ( $key ) {
@@ -156,9 +156,9 @@  discard block
 block discarded – undo
156 156
 
157 157
         $name = ( 'arrow' == $type ) ? 'collapse_icon' : 'repeat_icon';
158 158
 ?>
159
-    	<select name="<?php echo esc_attr( $frm_style->get_field_name($name) ) ?>" id="frm_<?php echo esc_attr( $name ) ?>" class="frm_icon_font frm_multiselect hide-if-js">
159
+    	<select name="<?php echo esc_attr( $frm_style->get_field_name( $name ) ) ?>" id="frm_<?php echo esc_attr( $name ) ?>" class="frm_icon_font frm_multiselect hide-if-js">
160 160
             <?php foreach ( $icons as $key => $icon ) { ?>
161
-			<option value="<?php echo esc_attr( $key ) ?>" <?php selected( $style->post_content[ $name ], $key ) ?>>
161
+			<option value="<?php echo esc_attr( $key ) ?>" <?php selected( $style->post_content[$name], $key ) ?>>
162 162
 				<?php echo '&#xe' . $icon['+'] . '; &#xe' . $icon['-'] . ';'; ?>
163 163
             </option>
164 164
             <?php } ?>
@@ -166,8 +166,8 @@  discard block
 block discarded – undo
166 166
 
167 167
         <div class="btn-group hide-if-no-js" id="frm_<?php echo esc_attr( $name ) ?>_select">
168 168
             <button class="multiselect dropdown-toggle btn btn-default" data-toggle="dropdown" type="button">
169
-				<i class="frm_icon_font <?php echo esc_attr( self::icon_key_to_class( $style->post_content[ $name ], '+', $type ) ) ?>"></i>
170
-				<i class="frm_icon_font <?php echo esc_attr( self::icon_key_to_class( $style->post_content[ $name ], '-', $type ) ) ?>"></i>
169
+				<i class="frm_icon_font <?php echo esc_attr( self::icon_key_to_class( $style->post_content[$name], '+', $type ) ) ?>"></i>
170
+				<i class="frm_icon_font <?php echo esc_attr( self::icon_key_to_class( $style->post_content[$name], '-', $type ) ) ?>"></i>
171 171
                 <b class="caret"></b>
172 172
             </button>
173 173
             <ul class="multiselect-container frm-dropdown-menu">
@@ -190,9 +190,9 @@  discard block
 block discarded – undo
190 190
     }
191 191
 
192 192
 	public static function hex2rgb( $hex ) {
193
-        $hex = str_replace('#', '', $hex);
193
+        $hex = str_replace( '#', '', $hex );
194 194
 
195
-        if ( strlen($hex) == 3 ) {
195
+        if ( strlen( $hex ) == 3 ) {
196 196
 			$r = hexdec( substr( $hex, 0, 1 ) . substr( $hex, 0, 1 ) );
197 197
 			$g = hexdec( substr( $hex, 1, 1 ) . substr( $hex, 1, 1 ) );
198 198
 			$b = hexdec( substr( $hex, 2, 1 ) . substr( $hex, 2, 1 ) );
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
 			$b = hexdec( substr( $hex, 4, 2 ) );
203 203
         }
204 204
 		$rgb = array( $r, $g, $b );
205
-        return implode(',', $rgb); // returns the rgb values separated by commas
205
+        return implode( ',', $rgb ); // returns the rgb values separated by commas
206 206
         //return $rgb; // returns an array with the rgb values
207 207
     }
208 208
 
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
 	 * @since 2.3
213 213
 	 */
214 214
 	public static function adjust_brightness( $hex, $steps ) {
215
-		$steps = max( -255, min( 255, $steps ) );
215
+		$steps = max( - 255, min( 255, $steps ) );
216 216
 
217 217
 		// Normalize into a six character long hex string
218 218
 		$hex = str_replace( '#', '', $hex );
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
 
229 229
 		foreach ( $color_parts as $color ) {
230 230
 			$color   = hexdec( $color ); // Convert to decimal
231
-			$color   = max( 0,min( 255,$color + $steps ) ); // Adjust color
231
+			$color   = max( 0, min( 255, $color + $steps ) ); // Adjust color
232 232
 			$return .= str_pad( dechex( $color ), 2, '0', STR_PAD_LEFT ); // Make two char hex code
233 233
 		}
234 234
 
@@ -263,8 +263,8 @@  discard block
 block discarded – undo
263 263
 
264 264
 		$checkbox_opts = array( 'important_style', 'auto_width', 'submit_style', 'collapse_icon', 'center_form' );
265 265
 		foreach ( $checkbox_opts as $opt ) {
266
-			if ( ! isset( $settings[ $opt ] ) ) {
267
-				$settings[ $opt ] = 0;
266
+			if ( ! isset( $settings[$opt] ) ) {
267
+				$settings[$opt] = 0;
268 268
 			}
269 269
 		}
270 270
 
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
 		$colors = self::allow_color_override();
281 281
 		foreach ( $colors as $css => $opts ) {
282 282
 			foreach ( $opts as $opt ) {
283
-				self::get_color_output( $css, $settings[ $opt ] );
283
+				self::get_color_output( $css, $settings[$opt] );
284 284
 			}
285 285
 		}
286 286
 	}
Please login to merge, or discard this patch.
Indentation   +100 added lines, -100 removed lines patch added patch discarded remove patch
@@ -1,67 +1,67 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 class FrmStylesHelper {
3 3
 
4
-    public static function jquery_themes() {
5
-        $themes = array(
6
-            'ui-lightness'  => 'UI Lightness',
7
-            'ui-darkness'   => 'UI Darkness',
8
-            'smoothness'    => 'Smoothness',
9
-            'start'         => 'Start',
10
-            'redmond'       => 'Redmond',
11
-            'sunny'         => 'Sunny',
12
-            'overcast'      => 'Overcast',
13
-            'le-frog'       => 'Le Frog',
14
-            'flick'         => 'Flick',
4
+	public static function jquery_themes() {
5
+		$themes = array(
6
+			'ui-lightness'  => 'UI Lightness',
7
+			'ui-darkness'   => 'UI Darkness',
8
+			'smoothness'    => 'Smoothness',
9
+			'start'         => 'Start',
10
+			'redmond'       => 'Redmond',
11
+			'sunny'         => 'Sunny',
12
+			'overcast'      => 'Overcast',
13
+			'le-frog'       => 'Le Frog',
14
+			'flick'         => 'Flick',
15 15
 			'pepper-grinder' => 'Pepper Grinder',
16
-            'eggplant'      => 'Eggplant',
17
-            'dark-hive'     => 'Dark Hive',
18
-            'cupertino'     => 'Cupertino',
19
-            'south-street'  => 'South Street',
20
-            'blitzer'       => 'Blitzer',
21
-            'humanity'      => 'Humanity',
22
-            'hot-sneaks'    => 'Hot Sneaks',
23
-            'excite-bike'   => 'Excite Bike',
24
-            'vader'         => 'Vader',
25
-            'dot-luv'       => 'Dot Luv',
26
-            'mint-choc'     => 'Mint Choc',
27
-            'black-tie'     => 'Black Tie',
28
-            'trontastic'    => 'Trontastic',
29
-            'swanky-purse'  => 'Swanky Purse',
30
-        );
31
-
32
-        $themes = apply_filters('frm_jquery_themes', $themes);
33
-        return $themes;
34
-    }
16
+			'eggplant'      => 'Eggplant',
17
+			'dark-hive'     => 'Dark Hive',
18
+			'cupertino'     => 'Cupertino',
19
+			'south-street'  => 'South Street',
20
+			'blitzer'       => 'Blitzer',
21
+			'humanity'      => 'Humanity',
22
+			'hot-sneaks'    => 'Hot Sneaks',
23
+			'excite-bike'   => 'Excite Bike',
24
+			'vader'         => 'Vader',
25
+			'dot-luv'       => 'Dot Luv',
26
+			'mint-choc'     => 'Mint Choc',
27
+			'black-tie'     => 'Black Tie',
28
+			'trontastic'    => 'Trontastic',
29
+			'swanky-purse'  => 'Swanky Purse',
30
+		);
31
+
32
+		$themes = apply_filters('frm_jquery_themes', $themes);
33
+		return $themes;
34
+	}
35 35
 
36 36
 	public static function jquery_css_url( $theme_css ) {
37
-        if ( $theme_css == -1 ) {
38
-            return;
39
-        }
40
-
41
-        if ( ! $theme_css || $theme_css == '' || $theme_css == 'ui-lightness' ) {
42
-            $css_file = FrmAppHelper::plugin_url() . '/css/ui-lightness/jquery-ui.css';
43
-        } else if ( preg_match('/^http.?:\/\/.*\..*$/', $theme_css) ) {
44
-            $css_file = $theme_css;
45
-        } else {
46
-            $uploads = self::get_upload_base();
37
+		if ( $theme_css == -1 ) {
38
+			return;
39
+		}
40
+
41
+		if ( ! $theme_css || $theme_css == '' || $theme_css == 'ui-lightness' ) {
42
+			$css_file = FrmAppHelper::plugin_url() . '/css/ui-lightness/jquery-ui.css';
43
+		} else if ( preg_match('/^http.?:\/\/.*\..*$/', $theme_css) ) {
44
+			$css_file = $theme_css;
45
+		} else {
46
+			$uploads = self::get_upload_base();
47 47
 			$file_path = '/formidable/css/' . $theme_css . '/jquery-ui.css';
48
-            if ( file_exists($uploads['basedir'] . $file_path) ) {
49
-                $css_file = $uploads['baseurl'] . $file_path;
50
-            } else {
48
+			if ( file_exists($uploads['basedir'] . $file_path) ) {
49
+				$css_file = $uploads['baseurl'] . $file_path;
50
+			} else {
51 51
 				$css_file = FrmAppHelper::jquery_ui_base_url() . '/themes/' . $theme_css . '/jquery-ui.min.css';
52
-            }
53
-        }
52
+			}
53
+		}
54 54
 
55
-        return $css_file;
56
-    }
55
+		return $css_file;
56
+	}
57 57
 
58
-    public static function enqueue_jquery_css() {
58
+	public static function enqueue_jquery_css() {
59 59
 		$form = self::get_form_for_page();
60 60
 		$theme_css = FrmStylesController::get_style_val( 'theme_css', $form );
61
-        if ( $theme_css != -1 ) {
62
-            wp_enqueue_style('jquery-theme', self::jquery_css_url($theme_css), array(), FrmAppHelper::plugin_version());
63
-        }
64
-    }
61
+		if ( $theme_css != -1 ) {
62
+			wp_enqueue_style('jquery-theme', self::jquery_css_url($theme_css), array(), FrmAppHelper::plugin_version());
63
+		}
64
+	}
65 65
 
66 66
 	public static function get_form_for_page() {
67 67
 		global $frm_vars;
@@ -77,14 +77,14 @@  discard block
 block discarded – undo
77 77
 		return $form_id;
78 78
 	}
79 79
 
80
-    public static function get_upload_base() {
81
-        $uploads = wp_upload_dir();
82
-        if ( is_ssl() && ! preg_match('/^https:\/\/.*\..*$/', $uploads['baseurl']) ) {
83
-            $uploads['baseurl'] = str_replace('http://', 'https://', $uploads['baseurl']);
84
-        }
80
+	public static function get_upload_base() {
81
+		$uploads = wp_upload_dir();
82
+		if ( is_ssl() && ! preg_match('/^https:\/\/.*\..*$/', $uploads['baseurl']) ) {
83
+			$uploads['baseurl'] = str_replace('http://', 'https://', $uploads['baseurl']);
84
+		}
85 85
 
86
-        return $uploads;
87
-    }
86
+		return $uploads;
87
+	}
88 88
 
89 89
 	public static function style_menu( $active = '' ) {
90 90
 ?>
@@ -94,22 +94,22 @@  discard block
 block discarded – undo
94 94
 			<a href="<?php echo esc_url( admin_url('admin.php?page=formidable-styles&frm_action=custom_css' ) ) ?>" class="nav-tab <?php echo ( 'custom_css' == $active ) ? 'nav-tab-active' : '' ?>"><?php _e( 'Custom CSS', 'formidable' ) ?></a>
95 95
         </h2>
96 96
 <?php
97
-    }
97
+	}
98 98
 
99
-    public static function minus_icons() {
100
-        return array(
99
+	public static function minus_icons() {
100
+		return array(
101 101
 			0 => array( '-' => '62e', '+' => '62f' ),
102 102
 			1 => array( '-' => '600', '+' => '602' ),
103 103
 			2 => array( '-' => '604', '+' => '603' ),
104 104
 			3 => array( '-' => '633', '+' => '632' ),
105 105
 			4 => array( '-' => '613', '+' => '60f' ),
106
-        );
107
-    }
106
+		);
107
+	}
108 108
 
109
-    public static function arrow_icons() {
110
-        $minus_icons = self::minus_icons();
109
+	public static function arrow_icons() {
110
+		$minus_icons = self::minus_icons();
111 111
 
112
-        return array(
112
+		return array(
113 113
 			6 => array( '-' => '62d', '+' => '62a' ),
114 114
 			0 => array( '-' => '60d', '+' => '609' ),
115 115
 			1 => array( '-' => '60e', '+' => '60c' ),
@@ -117,44 +117,44 @@  discard block
 block discarded – undo
117 117
 			3 => array( '-' => '62b', '+' => '628' ),
118 118
 			4 => array( '-' => '62c', '+' => '629' ),
119 119
 			5 => array( '-' => '635', '+' => '634' ),
120
-            'p0' => $minus_icons[0],
121
-            'p1' => $minus_icons[1],
122
-            'p2' => $minus_icons[2],
123
-            'p3' => $minus_icons[3],
124
-            'p4' => $minus_icons[4],
125
-        );
126
-    }
127
-
128
-    /**
129
-     * @since 2.0
130
-     * @return The class for this icon
131
-     */
120
+			'p0' => $minus_icons[0],
121
+			'p1' => $minus_icons[1],
122
+			'p2' => $minus_icons[2],
123
+			'p3' => $minus_icons[3],
124
+			'p4' => $minus_icons[4],
125
+		);
126
+	}
127
+
128
+	/**
129
+	 * @since 2.0
130
+	 * @return The class for this icon
131
+	 */
132 132
 	public static function icon_key_to_class( $key, $icon = '+', $type = 'arrow' ) {
133
-        if ( 'arrow' == $type && is_numeric($key) ) {
134
-            //frm_arrowup6_icon
133
+		if ( 'arrow' == $type && is_numeric($key) ) {
134
+			//frm_arrowup6_icon
135 135
 			$arrow = array( '-' => 'down', '+' => 'up' );
136 136
 			$class = 'frm_arrow' . $arrow[ $icon ];
137
-        } else {
138
-            //frm_minus1_icon
139
-            $key = str_replace('p', '', $key);
137
+		} else {
138
+			//frm_minus1_icon
139
+			$key = str_replace('p', '', $key);
140 140
 			$plus = array( '-' => 'minus', '+' => 'plus' );
141 141
 			$class = 'frm_' . $plus[ $icon ];
142
-        }
142
+		}
143 143
 
144
-        if ( $key ) {
145
-            $class .= $key;
146
-        }
147
-        $class .= '_icon';
144
+		if ( $key ) {
145
+			$class .= $key;
146
+		}
147
+		$class .= '_icon';
148 148
 
149
-        return $class;
150
-    }
149
+		return $class;
150
+	}
151 151
 
152 152
 	public static function bs_icon_select( $style, $frm_style, $type = 'arrow' ) {
153 153
 		$function_name = $type . '_icons';
154 154
 		$icons = self::$function_name();
155 155
 		unset( $function_name );
156 156
 
157
-        $name = ( 'arrow' == $type ) ? 'collapse_icon' : 'repeat_icon';
157
+		$name = ( 'arrow' == $type ) ? 'collapse_icon' : 'repeat_icon';
158 158
 ?>
159 159
     	<select name="<?php echo esc_attr( $frm_style->get_field_name($name) ) ?>" id="frm_<?php echo esc_attr( $name ) ?>" class="frm_icon_font frm_multiselect hide-if-js">
160 160
             <?php foreach ( $icons as $key => $icon ) { ?>
@@ -187,24 +187,24 @@  discard block
 block discarded – undo
187 187
             </ul>
188 188
         </div>
189 189
 <?php
190
-    }
190
+	}
191 191
 
192 192
 	public static function hex2rgb( $hex ) {
193
-        $hex = str_replace('#', '', $hex);
193
+		$hex = str_replace('#', '', $hex);
194 194
 
195
-        if ( strlen($hex) == 3 ) {
195
+		if ( strlen($hex) == 3 ) {
196 196
 			$r = hexdec( substr( $hex, 0, 1 ) . substr( $hex, 0, 1 ) );
197 197
 			$g = hexdec( substr( $hex, 1, 1 ) . substr( $hex, 1, 1 ) );
198 198
 			$b = hexdec( substr( $hex, 2, 1 ) . substr( $hex, 2, 1 ) );
199
-        } else {
199
+		} else {
200 200
 			$r = hexdec( substr( $hex, 0, 2 ) );
201 201
 			$g = hexdec( substr( $hex, 2, 2 ) );
202 202
 			$b = hexdec( substr( $hex, 4, 2 ) );
203
-        }
203
+		}
204 204
 		$rgb = array( $r, $g, $b );
205
-        return implode(',', $rgb); // returns the rgb values separated by commas
206
-        //return $rgb; // returns an array with the rgb values
207
-    }
205
+		return implode(',', $rgb); // returns the rgb values separated by commas
206
+		//return $rgb; // returns an array with the rgb values
207
+	}
208 208
 
209 209
 	/**
210 210
 	 * @param $hex string - The original color in hex format #ffffff
Please login to merge, or discard this patch.
classes/controllers/FrmHooksController.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -139,8 +139,8 @@
 block discarded – undo
139 139
         add_action( 'wp_ajax_frm_deauthorize', 'FrmAppController::deauthorize' );
140 140
 
141 141
 		// Addons
142
-		add_action('wp_ajax_frm_addon_activate', 'FrmAddon::activate' );
143
-		add_action('wp_ajax_frm_addon_deactivate', 'FrmAddon::deactivate' );
142
+		add_action( 'wp_ajax_frm_addon_activate', 'FrmAddon::activate' );
143
+		add_action( 'wp_ajax_frm_addon_deactivate', 'FrmAddon::deactivate' );
144 144
 		add_action( 'wp_ajax_frm_fill_licenses', 'FrmAddonsController::get_licenses' );
145 145
 
146 146
         // Fields Controller
Please login to merge, or discard this patch.
Indentation   +138 added lines, -138 removed lines patch added patch discarded remove patch
@@ -1,89 +1,89 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 class FrmHooksController {
4
-    /**
5
-     * Trigger plugin-wide hook loading
6
-     */
7
-    public static function trigger_load_hook( $hooks = 'load_hooks' ) {
8
-        $controllers = apply_filters( 'frm_load_controllers', array( 'FrmHooksController' ) );
9
-
10
-        $trigger_hooks = $hooks;
11
-        $hooks = (array) $hooks;
12
-
13
-        if ( 'load_hooks' == $trigger_hooks ) {
14
-            if ( is_admin() ) {
15
-                $hooks[] = 'load_admin_hooks';
16
-                if ( defined( 'DOING_AJAX' ) ) {
17
-                    $hooks[] = 'load_ajax_hooks';
18
-                    $hooks[] = 'load_form_hooks';
19
-                }
20
-            }
21
-
22
-            if ( is_multisite() ) {
23
-                $hooks[] = 'load_multisite_hooks';
24
-            }
25
-        } else {
26
-            // Make sure the hooks are only triggered once
27
-            add_filter( 'frm' . str_replace( 'load', '', $trigger_hooks ) . '_loaded', '__return_true' );
28
-        }
29
-        unset( $trigger_hooks );
30
-
31
-        // Instansiate Controllers
32
-        foreach ( $controllers as $c ) {
33
-            foreach ( $hooks as $hook ) {
4
+	/**
5
+	 * Trigger plugin-wide hook loading
6
+	 */
7
+	public static function trigger_load_hook( $hooks = 'load_hooks' ) {
8
+		$controllers = apply_filters( 'frm_load_controllers', array( 'FrmHooksController' ) );
9
+
10
+		$trigger_hooks = $hooks;
11
+		$hooks = (array) $hooks;
12
+
13
+		if ( 'load_hooks' == $trigger_hooks ) {
14
+			if ( is_admin() ) {
15
+				$hooks[] = 'load_admin_hooks';
16
+				if ( defined( 'DOING_AJAX' ) ) {
17
+					$hooks[] = 'load_ajax_hooks';
18
+					$hooks[] = 'load_form_hooks';
19
+				}
20
+			}
21
+
22
+			if ( is_multisite() ) {
23
+				$hooks[] = 'load_multisite_hooks';
24
+			}
25
+		} else {
26
+			// Make sure the hooks are only triggered once
27
+			add_filter( 'frm' . str_replace( 'load', '', $trigger_hooks ) . '_loaded', '__return_true' );
28
+		}
29
+		unset( $trigger_hooks );
30
+
31
+		// Instansiate Controllers
32
+		foreach ( $controllers as $c ) {
33
+			foreach ( $hooks as $hook ) {
34 34
 				call_user_func( array( $c, $hook ) );
35 35
 				unset( $hook );
36
-            }
36
+			}
37 37
 			unset( $c );
38
-        }
38
+		}
39 39
 
40
-    }
40
+	}
41 41
 
42
-    public static function trigger_load_form_hooks() {
43
-        self::trigger_load_hook( 'load_form_hooks' );
44
-    }
42
+	public static function trigger_load_form_hooks() {
43
+		self::trigger_load_hook( 'load_form_hooks' );
44
+	}
45 45
 
46 46
 	public static function load_hooks() {
47
-        if ( ! is_admin() ) {
48
-            add_filter( 'the_content', 'FrmAppController::page_route', 10 );
49
-        }
47
+		if ( ! is_admin() ) {
48
+			add_filter( 'the_content', 'FrmAppController::page_route', 10 );
49
+		}
50 50
 
51
-        add_action( 'plugins_loaded', 'FrmAppController::load_lang' );
52
-        add_filter( 'widget_text', 'FrmAppController::widget_text_filter', 8 );
51
+		add_action( 'plugins_loaded', 'FrmAppController::load_lang' );
52
+		add_filter( 'widget_text', 'FrmAppController::widget_text_filter', 8 );
53 53
 
54
-        // Entries controller
55
-        add_action( 'wp_loaded', 'FrmEntriesController::process_entry', 10, 0 );
56
-        add_filter( 'frm_redirect_url', 'FrmEntriesController::delete_entry_before_redirect', 50, 3 );
57
-        add_action( 'frm_after_entry_processed', 'FrmEntriesController::delete_entry_after_save', 100 );
54
+		// Entries controller
55
+		add_action( 'wp_loaded', 'FrmEntriesController::process_entry', 10, 0 );
56
+		add_filter( 'frm_redirect_url', 'FrmEntriesController::delete_entry_before_redirect', 50, 3 );
57
+		add_action( 'frm_after_entry_processed', 'FrmEntriesController::delete_entry_after_save', 100 );
58 58
 
59
-        // Form Actions Controller
60
-        add_action( 'init', 'FrmFormActionsController::register_post_types', 1 );
59
+		// Form Actions Controller
60
+		add_action( 'init', 'FrmFormActionsController::register_post_types', 1 );
61 61
 		add_action( 'frm_after_create_entry', 'FrmFormActionsController::trigger_create_actions', 20, 3 );
62 62
 
63
-        // Forms Controller
64
-        add_action( 'widgets_init', 'FrmFormsController::register_widgets' );
63
+		// Forms Controller
64
+		add_action( 'widgets_init', 'FrmFormsController::register_widgets' );
65 65
 		add_action( 'init', 'FrmFormsController::front_head' );
66
-        add_filter( 'frm_content', 'FrmFormsController::filter_content', 10, 3 );
67
-        add_filter( 'frm_replace_content_shortcodes', 'FrmFormsController::replace_content_shortcodes', 20, 3 );
68
-        add_action( 'admin_bar_init', 'FrmFormsController::admin_bar_css' );
66
+		add_filter( 'frm_content', 'FrmFormsController::filter_content', 10, 3 );
67
+		add_filter( 'frm_replace_content_shortcodes', 'FrmFormsController::replace_content_shortcodes', 20, 3 );
68
+		add_action( 'admin_bar_init', 'FrmFormsController::admin_bar_css' );
69 69
 		add_action( 'wp_footer', 'FrmFormsController::footer_js', 1, 0 );
70 70
 
71 71
 		add_action( 'wp_scheduled_delete', 'FrmForm::scheduled_delete' );
72 72
 
73
-        // Form Shortcodes
74
-        add_shortcode( 'formidable', 'FrmFormsController::get_form_shortcode' );
73
+		// Form Shortcodes
74
+		add_shortcode( 'formidable', 'FrmFormsController::get_form_shortcode' );
75 75
 
76
-        // Styles Controller
77
-        add_action( 'init', 'FrmStylesController::register_post_types', 0 );
78
-        add_filter( 'frm_get_style_opts', 'FrmStylesController::get_style_opts' );
79
-        add_filter( 'frm_add_form_style_class', 'FrmStylesController::get_form_style_class', 10, 2 );
80
-        add_filter( 'frm_show_entry_styles', 'FrmStylesController::show_entry_styles' );
81
-    }
76
+		// Styles Controller
77
+		add_action( 'init', 'FrmStylesController::register_post_types', 0 );
78
+		add_filter( 'frm_get_style_opts', 'FrmStylesController::get_style_opts' );
79
+		add_filter( 'frm_add_form_style_class', 'FrmStylesController::get_form_style_class', 10, 2 );
80
+		add_filter( 'frm_show_entry_styles', 'FrmStylesController::show_entry_styles' );
81
+	}
82 82
 
83 83
 	public static function load_admin_hooks() {
84
-        add_action( 'admin_menu', 'FrmAppController::menu', 1 );
85
-        add_action( 'admin_enqueue_scripts', 'FrmAppController::load_wp_admin_style' );
86
-        add_action( 'admin_notices', 'FrmAppController::pro_get_started_headline' );
84
+		add_action( 'admin_menu', 'FrmAppController::menu', 1 );
85
+		add_action( 'admin_enqueue_scripts', 'FrmAppController::load_wp_admin_style' );
86
+		add_action( 'admin_notices', 'FrmAppController::pro_get_started_headline' );
87 87
 		add_action( 'admin_init', 'FrmAppController::admin_init', 11 );
88 88
 		add_filter( 'plugin_action_links_' . FrmAppHelper::plugin_folder() . '/formidable.php', 'FrmAppController::settings_link' );
89 89
 		register_activation_hook( FrmAppHelper::plugin_folder() . '/formidable.php', 'FrmAppController::activation_install' );
@@ -92,117 +92,117 @@  discard block
 block discarded – undo
92 92
 		add_action( 'admin_menu', 'FrmAddonsController::menu', 100 );
93 93
 		add_filter( 'upgrader_pre_download', 'FrmAddonsController::add_shorten_edd_filename_filter', 10, 4 );
94 94
 
95
-        // Entries Controller
96
-        add_action( 'admin_menu', 'FrmEntriesController::menu', 12 );
97
-        add_filter( 'contextual_help', 'FrmEntriesController::contextual_help', 10, 3 );
98
-        add_filter( 'set-screen-option', 'FrmEntriesController::save_per_page', 10, 3 );
99
-        add_filter( 'update_user_metadata', 'FrmEntriesController::check_hidden_cols', 10, 5 );
100
-        add_action( 'updated_user_meta', 'FrmEntriesController::update_hidden_cols', 10, 4 );
101
-
102
-        // Form Actions Controller
103
-        if ( FrmAppHelper::is_admin_page( 'formidable' ) ) {
104
-            add_action( 'frm_before_update_form_settings', 'FrmFormActionsController::update_settings' );
105
-        }
106
-        add_action( 'frm_after_duplicate_form', 'FrmFormActionsController::duplicate_form_actions', 20, 3 );
107
-
108
-        // Forms Controller
109
-        add_action( 'admin_menu', 'FrmFormsController::menu', 10 );
110
-        add_action( 'admin_head-toplevel_page_formidable', 'FrmFormsController::head' );
111
-
112
-        add_filter( 'set-screen-option', 'FrmFormsController::save_per_page', 10, 3 );
113
-        add_action( 'admin_footer', 'FrmFormsController::insert_form_popup' );
95
+		// Entries Controller
96
+		add_action( 'admin_menu', 'FrmEntriesController::menu', 12 );
97
+		add_filter( 'contextual_help', 'FrmEntriesController::contextual_help', 10, 3 );
98
+		add_filter( 'set-screen-option', 'FrmEntriesController::save_per_page', 10, 3 );
99
+		add_filter( 'update_user_metadata', 'FrmEntriesController::check_hidden_cols', 10, 5 );
100
+		add_action( 'updated_user_meta', 'FrmEntriesController::update_hidden_cols', 10, 4 );
101
+
102
+		// Form Actions Controller
103
+		if ( FrmAppHelper::is_admin_page( 'formidable' ) ) {
104
+			add_action( 'frm_before_update_form_settings', 'FrmFormActionsController::update_settings' );
105
+		}
106
+		add_action( 'frm_after_duplicate_form', 'FrmFormActionsController::duplicate_form_actions', 20, 3 );
107
+
108
+		// Forms Controller
109
+		add_action( 'admin_menu', 'FrmFormsController::menu', 10 );
110
+		add_action( 'admin_head-toplevel_page_formidable', 'FrmFormsController::head' );
111
+
112
+		add_filter( 'set-screen-option', 'FrmFormsController::save_per_page', 10, 3 );
113
+		add_action( 'admin_footer', 'FrmFormsController::insert_form_popup' );
114 114
 		add_action( 'media_buttons', 'FrmFormsController::insert_form_button' );
115 115
 
116
-        // Forms Model
117
-        add_action( 'frm_after_duplicate_form', 'FrmForm::after_duplicate', 10, 2 );
116
+		// Forms Model
117
+		add_action( 'frm_after_duplicate_form', 'FrmForm::after_duplicate', 10, 2 );
118 118
 
119
-        // Settings Controller
120
-        add_action( 'admin_menu', 'FrmSettingsController::menu', 45 );
121
-        add_action( 'frm_before_settings', 'FrmSettingsController::license_box' );
119
+		// Settings Controller
120
+		add_action( 'admin_menu', 'FrmSettingsController::menu', 45 );
121
+		add_action( 'frm_before_settings', 'FrmSettingsController::license_box' );
122 122
 		add_action( 'wp_ajax_frm_settings_tab', 'FrmSettingsController::load_settings_tab' );
123 123
 
124
-        // Styles Controller
125
-        add_action( 'admin_menu', 'FrmStylesController::menu', 14 );
126
-        add_action( 'admin_init', 'FrmStylesController::admin_init' );
124
+		// Styles Controller
125
+		add_action( 'admin_menu', 'FrmStylesController::menu', 14 );
126
+		add_action( 'admin_init', 'FrmStylesController::admin_init' );
127 127
 
128
-        // XML Controller
129
-        add_action( 'admin_menu', 'FrmXMLController::menu', 41 );
130
-    }
128
+		// XML Controller
129
+		add_action( 'admin_menu', 'FrmXMLController::menu', 41 );
130
+	}
131 131
 
132 132
 	public static function load_ajax_hooks() {
133 133
 		add_action( 'wp_ajax_frm_silent_upgrade', 'FrmAppController::ajax_install' );
134 134
 		add_action( 'wp_ajax_nopriv_frm_silent_upgrade', 'FrmAppController::ajax_install' );
135 135
 		add_action( 'wp_ajax_frm_install', 'FrmAppController::ajax_install' );
136
-        add_action( 'wp_ajax_frm_uninstall', 'FrmAppController::uninstall' );
137
-        add_action( 'wp_ajax_frm_deauthorize', 'FrmAppController::deauthorize' );
136
+		add_action( 'wp_ajax_frm_uninstall', 'FrmAppController::uninstall' );
137
+		add_action( 'wp_ajax_frm_deauthorize', 'FrmAppController::deauthorize' );
138 138
 
139 139
 		// Addons
140 140
 		add_action('wp_ajax_frm_addon_activate', 'FrmAddon::activate' );
141 141
 		add_action('wp_ajax_frm_addon_deactivate', 'FrmAddon::deactivate' );
142 142
 		add_action( 'wp_ajax_frm_fill_licenses', 'FrmAddonsController::get_licenses' );
143 143
 
144
-        // Fields Controller
145
-        add_action( 'wp_ajax_frm_load_field', 'FrmFieldsController::load_field' );
146
-        add_action( 'wp_ajax_frm_insert_field', 'FrmFieldsController::create' );
147
-        add_action( 'wp_ajax_frm_field_name_in_place_edit', 'FrmFieldsController::edit_name' );
148
-        add_action( 'wp_ajax_frm_update_ajax_option', 'FrmFieldsController::update_ajax_option' );
149
-        add_action( 'wp_ajax_frm_duplicate_field', 'FrmFieldsController::duplicate' );
150
-        add_action( 'wp_ajax_frm_delete_field', 'FrmFieldsController::destroy' );
151
-        add_action( 'wp_ajax_frm_add_field_option', 'FrmFieldsController::add_option' );
152
-        add_action( 'wp_ajax_frm_import_choices', 'FrmFieldsController::import_choices' );
153
-        add_action( 'wp_ajax_frm_import_options', 'FrmFieldsController::import_options' );
154
-        add_action( 'wp_ajax_frm_update_field_order', 'FrmFieldsController::update_order' );
155
-
156
-        // Form Actions Controller
157
-        add_action( 'wp_ajax_frm_add_form_action', 'FrmFormActionsController::add_form_action' );
158
-        add_action( 'wp_ajax_frm_form_action_fill', 'FrmFormActionsController::fill_action' );
159
-
160
-        // Forms Controller
144
+		// Fields Controller
145
+		add_action( 'wp_ajax_frm_load_field', 'FrmFieldsController::load_field' );
146
+		add_action( 'wp_ajax_frm_insert_field', 'FrmFieldsController::create' );
147
+		add_action( 'wp_ajax_frm_field_name_in_place_edit', 'FrmFieldsController::edit_name' );
148
+		add_action( 'wp_ajax_frm_update_ajax_option', 'FrmFieldsController::update_ajax_option' );
149
+		add_action( 'wp_ajax_frm_duplicate_field', 'FrmFieldsController::duplicate' );
150
+		add_action( 'wp_ajax_frm_delete_field', 'FrmFieldsController::destroy' );
151
+		add_action( 'wp_ajax_frm_add_field_option', 'FrmFieldsController::add_option' );
152
+		add_action( 'wp_ajax_frm_import_choices', 'FrmFieldsController::import_choices' );
153
+		add_action( 'wp_ajax_frm_import_options', 'FrmFieldsController::import_options' );
154
+		add_action( 'wp_ajax_frm_update_field_order', 'FrmFieldsController::update_order' );
155
+
156
+		// Form Actions Controller
157
+		add_action( 'wp_ajax_frm_add_form_action', 'FrmFormActionsController::add_form_action' );
158
+		add_action( 'wp_ajax_frm_form_action_fill', 'FrmFormActionsController::fill_action' );
159
+
160
+		// Forms Controller
161 161
 		add_action( 'wp_ajax_frm_create_from_template', 'FrmFormsController::_create_from_template' );
162 162
 		add_action( 'wp_ajax_frm_save_form', 'FrmFormsController::route' );
163 163
 		add_action( 'wp_ajax_frm_form_key_in_place_edit', 'FrmFormsController::edit_key' );
164 164
 		add_action( 'wp_ajax_frm_form_desc_in_place_edit', 'FrmFormsController::edit_description' );
165
-        add_action( 'wp_ajax_frm_get_default_html', 'FrmFormsController::get_email_html' );
166
-        add_action( 'wp_ajax_frm_get_shortcode_opts', 'FrmFormsController::get_shortcode_opts' );
167
-        add_action( 'wp_ajax_frm_forms_preview', 'FrmFormsController::preview' );
168
-        add_action( 'wp_ajax_nopriv_frm_forms_preview', 'FrmFormsController::preview' );
169
-
170
-        // Styles Controller
171
-        add_action( 'wp_ajax_frm_settings_reset', 'FrmStylesController::reset_styling' );
172
-        add_action( 'wp_ajax_frm_change_styling', 'FrmStylesController::change_styling' );
173
-        add_action( 'wp_ajax_frmpro_load_css', 'FrmStylesController::load_css' );
174
-        add_action( 'wp_ajax_nopriv_frmpro_load_css', 'FrmStylesController::load_css' );
165
+		add_action( 'wp_ajax_frm_get_default_html', 'FrmFormsController::get_email_html' );
166
+		add_action( 'wp_ajax_frm_get_shortcode_opts', 'FrmFormsController::get_shortcode_opts' );
167
+		add_action( 'wp_ajax_frm_forms_preview', 'FrmFormsController::preview' );
168
+		add_action( 'wp_ajax_nopriv_frm_forms_preview', 'FrmFormsController::preview' );
169
+
170
+		// Styles Controller
171
+		add_action( 'wp_ajax_frm_settings_reset', 'FrmStylesController::reset_styling' );
172
+		add_action( 'wp_ajax_frm_change_styling', 'FrmStylesController::change_styling' );
173
+		add_action( 'wp_ajax_frmpro_load_css', 'FrmStylesController::load_css' );
174
+		add_action( 'wp_ajax_nopriv_frmpro_load_css', 'FrmStylesController::load_css' );
175 175
 		add_action( 'wp_ajax_frmpro_css', 'FrmStylesController::load_saved_css' );
176 176
 		add_action( 'wp_ajax_nopriv_frmpro_css', 'FrmStylesController::load_saved_css' );
177 177
 
178
-        // XML Controller
178
+		// XML Controller
179 179
 		add_action( 'wp_ajax_frm_entries_csv', 'FrmXMLController::csv' );
180 180
 		add_action( 'wp_ajax_nopriv_frm_entries_csv', 'FrmXMLController::csv' );
181
-        add_action( 'wp_ajax_frm_export_xml', 'FrmXMLController::export_xml' );
182
-    }
181
+		add_action( 'wp_ajax_frm_export_xml', 'FrmXMLController::export_xml' );
182
+	}
183 183
 
184 184
 	public static function load_form_hooks() {
185
-        // Fields Controller
186
-        add_filter( 'frm_field_type', 'FrmFieldsController::change_type' );
187
-        add_action( 'frm_field_input_html', 'FrmFieldsController::input_html' );
188
-        add_filter( 'frm_field_value_saved', 'FrmFieldsController::check_value', 50, 3 );
189
-        add_filter( 'frm_field_label_seen', 'FrmFieldsController::check_label' );
185
+		// Fields Controller
186
+		add_filter( 'frm_field_type', 'FrmFieldsController::change_type' );
187
+		add_action( 'frm_field_input_html', 'FrmFieldsController::input_html' );
188
+		add_filter( 'frm_field_value_saved', 'FrmFieldsController::check_value', 50, 3 );
189
+		add_filter( 'frm_field_label_seen', 'FrmFieldsController::check_label' );
190 190
 
191 191
 		// Forms Controller
192 192
 		add_filter( 'frm_form_classes', 'FrmFormsController::form_classes' );
193 193
 
194
-        // Styles Controller
195
-        add_filter( 'frm_use_important_width', 'FrmStylesController::important_style', 10, 2 );
196
-    }
194
+		// Styles Controller
195
+		add_filter( 'frm_use_important_width', 'FrmStylesController::important_style', 10, 2 );
196
+	}
197 197
 
198 198
 	public static function load_view_hooks() {
199
-        // Hooks go here when a view is loaded
200
-    }
199
+		// Hooks go here when a view is loaded
200
+	}
201 201
 
202 202
 	public static function load_multisite_hooks() {
203 203
 		add_action( 'wpmu_upgrade_site', 'FrmAppController::network_upgrade_site' );
204 204
 
205
-        // drop tables when mu site is deleted
206
-        add_filter( 'wpmu_drop_tables', 'FrmAppController::drop_tables' );
207
-    }
205
+		// drop tables when mu site is deleted
206
+		add_filter( 'wpmu_drop_tables', 'FrmAppController::drop_tables' );
207
+	}
208 208
 }
Please login to merge, or discard this patch.
classes/views/frm-fields/front-end/dropdown-field.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,17 +1,17 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 $read_only = false;
4
-if ( isset($field['post_field']) && $field['post_field'] == 'post_category' && FrmAppHelper::pro_is_installed() ) {
4
+if ( isset( $field['post_field'] ) && $field['post_field'] == 'post_category' && FrmAppHelper::pro_is_installed() ) {
5 5
 	echo FrmProPost::get_category_dropdown( $field, array( 'location' => 'front', 'name' => $field_name, 'id' => $html_id ) );
6 6
 } else {
7 7
 	if ( FrmAppHelper::pro_is_installed() && FrmField::is_read_only( $field ) && ! FrmAppHelper::is_admin() ) {
8 8
 		$read_only = true;
9 9
 
10 10
 		echo FrmProDropdownFieldsController::get_hidden_fields_with_readonly_values( $field, $field_name, $html_id ); ?>
11
-		<select <?php do_action('frm_field_input_html', $field) ?>> <?php
11
+		<select <?php do_action( 'frm_field_input_html', $field ) ?>> <?php
12 12
 
13 13
 	} else { ?>
14
-		<select name="<?php echo esc_attr( $field_name ) ?>" id="<?php echo esc_attr( $html_id ) ?>" <?php do_action('frm_field_input_html', $field) ?>>
14
+		<select name="<?php echo esc_attr( $field_name ) ?>" id="<?php echo esc_attr( $html_id ) ?>" <?php do_action( 'frm_field_input_html', $field ) ?>>
15 15
 	<?php   }
16 16
 
17 17
 	$other_opt = false;
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 			}
28 28
 		}
29 29
 		?>
30
-		<option value="<?php echo esc_attr($field_val) ?>" <?php echo $selected ? ' selected="selected"' : ''; ?><?php echo ( FrmFieldsHelper::is_other_opt( $opt_key ) ) ? ' class="frm_other_trigger"' : '';?>><?php echo esc_html( $opt == '' ? ' ' : $opt ); ?></option>
30
+		<option value="<?php echo esc_attr( $field_val ) ?>" <?php echo $selected ? ' selected="selected"' : ''; ?><?php echo ( FrmFieldsHelper::is_other_opt( $opt_key ) ) ? ' class="frm_other_trigger"' : ''; ?>><?php echo esc_html( $opt == '' ? ' ' : $opt ); ?></option>
31 31
 		<?php
32 32
 	} ?>
33 33
 	</select>
Please login to merge, or discard this patch.
classes/views/frm-fields/back-end/dropdown-field.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if ( isset($field['post_field']) && $field['post_field'] == 'post_category' && FrmAppHelper::pro_is_installed() ) {
3
+if ( isset( $field['post_field'] ) && $field['post_field'] == 'post_category' && FrmAppHelper::pro_is_installed() ) {
4 4
 	echo FrmProPost::get_category_dropdown( $field, array( 'name' => $field_name, 'id' => 'placeholder_id', 'location' => 'form_builder' ) );
5 5
 } else { ?>
6 6
 	<select id="frm_dropdown_<?php echo esc_attr( $field['id'] ) ?>"
@@ -8,8 +8,8 @@  discard block
 block discarded – undo
8 8
 	echo FrmField::is_option_true( $field, 'size' ) ? 'class="auto_width"' : '';
9 9
 	echo FrmField::is_option_true( $field, 'multiple' ) ? ' multiple="multiple"' : ''; ?> >
10 10
 		<?php foreach ( $field['options'] as $opt_key => $opt ) {
11
-			$field_val = apply_filters('frm_field_value_saved', $opt, $opt_key, $field);
12
-			$opt = apply_filters('frm_field_label_seen', $opt, $opt_key, $field);
11
+			$field_val = apply_filters( 'frm_field_value_saved', $opt, $opt_key, $field );
12
+			$opt = apply_filters( 'frm_field_label_seen', $opt, $opt_key, $field );
13 13
 			$selected = ( $field['default_value'] == $field_val || FrmFieldsHelper::get_other_val( array( 'opt_key', 'field' ) ) ) ? ' selected="selected"' : ''; ?>
14 14
 			<option value="<?php echo esc_attr( $field_val ) ?>"<?php echo $selected ?>><?php echo esc_html( $opt ) ?> </option>
15 15
 		<?php } ?>
@@ -27,9 +27,9 @@  discard block
 block discarded – undo
27 27
 	<?php
28 28
 
29 29
 	if ( ! isset( $field['post_field'] ) || ! in_array( $field['post_field'], array( 'post_category' ) ) ) { ?>
30
-		<?php do_action('frm_add_multiple_opts_labels', $field); ?>
31
-		<ul id="frm_field_<?php echo esc_attr( $field['id'] ) ?>_opts" class="frm_sortable_field_opts<?php echo ( count($field['options']) > 10 ) ? ' frm_field_opts_list' : ''; ?>">
32
-			<?php FrmFieldsHelper::show_single_option($field); ?>
30
+		<?php do_action( 'frm_add_multiple_opts_labels', $field ); ?>
31
+		<ul id="frm_field_<?php echo esc_attr( $field['id'] ) ?>_opts" class="frm_sortable_field_opts<?php echo ( count( $field['options'] ) > 10 ) ? ' frm_field_opts_list' : ''; ?>">
32
+			<?php FrmFieldsHelper::show_single_option( $field ); ?>
33 33
 		</ul>
34 34
 		<?php
35 35
 	} ?>
Please login to merge, or discard this patch.
classes/views/frm-forms/add_field_links.php 2 patches
Indentation   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -65,18 +65,18 @@  discard block
 block discarded – undo
65 65
                 	</ul>
66 66
                 </li>
67 67
 <?php
68
-                } else {
69
-                    $field_label = $field_type;
70
-                    ?>
68
+				} else {
69
+					$field_label = $field_type;
70
+					?>
71 71
 					<li class="frmbutton button <?php echo esc_attr( $col_class . ' ' . $no_allow_class . ' frm_t' . $field_key ) ?>" id="<?php echo esc_attr( $field_key ) ?>">
72 72
 						<?php echo apply_filters( 'frmpro_field_links', $field_label, $id, $field_key ) ?>
73 73
 					</li>
74 74
                     <?php
75
-                }
75
+				}
76 76
 
77
-                $col_class = empty($col_class) ? 'frm_col_one' : '';
78
-                unset($field_key, $field_type, $field_label);
79
-            } ?>
77
+				$col_class = empty($col_class) ? 'frm_col_one' : '';
78
+				unset($field_key, $field_type, $field_label);
79
+			} ?>
80 80
             </ul>
81 81
             <div class="clear"></div>
82 82
         </div>
@@ -87,33 +87,33 @@  discard block
 block discarded – undo
87 87
 			<?php _e( '2. This box will activate and you can click to insert classes.', 'formidable' ) ?></p>
88 88
     	    <ul class="frm_code_list">
89 89
     	    <?php $classes = array(
90
-                    'frm_first'     => array(
91
-                        'label' => __( 'First', 'formidable' ),
92
-                        'title' => __( 'Add this to the first field in each row along with a width. ie frm_first frm_third', 'formidable' ),
93
-                    ),
94
-                    'frm_half'      => __( '1/2', 'formidable' ),
95
-                    'frm_third'     => __( '1/3', 'formidable' ),
96
-                    'frm_two_thirds' => __( '2/3', 'formidable' ),
97
-    	            'frm_fourth'    => __( '1/4', 'formidable' ),
90
+					'frm_first'     => array(
91
+						'label' => __( 'First', 'formidable' ),
92
+						'title' => __( 'Add this to the first field in each row along with a width. ie frm_first frm_third', 'formidable' ),
93
+					),
94
+					'frm_half'      => __( '1/2', 'formidable' ),
95
+					'frm_third'     => __( '1/3', 'formidable' ),
96
+					'frm_two_thirds' => __( '2/3', 'formidable' ),
97
+					'frm_fourth'    => __( '1/4', 'formidable' ),
98 98
 					'frm_three_fourths' => __( '3/4', 'formidable' ),
99
-                    'frm_fifth'     => __( '1/5', 'formidable' ),
99
+					'frm_fifth'     => __( '1/5', 'formidable' ),
100 100
 					'frm_two_fifths' => __( '2/5', 'formidable' ),
101
-                    'frm_sixth'     => __( '1/6', 'formidable' ),
102
-                    'frm_seventh'   => __( '1/7', 'formidable' ),
101
+					'frm_sixth'     => __( '1/6', 'formidable' ),
102
+					'frm_seventh'   => __( '1/7', 'formidable' ),
103 103
 					'frm_eighth'    => __( '1/8', 'formidable' ),
104 104
 					'frm_alignright' => __( 'Right', 'formidable' ),
105
-    	            'frm_inline'    => array(
106
-                        'label' => __( 'Inline', 'formidable' ),
105
+					'frm_inline'    => array(
106
+						'label' => __( 'Inline', 'formidable' ),
107 107
 						'title' => __( 'Align fields in a row without a specific width.', 'formidable' ),
108
-                    ),
108
+					),
109 109
 
110
-    	            'frm_full' => array(
111
-                        'label' => __( '100% width', 'formidable' ),
110
+					'frm_full' => array(
111
+						'label' => __( '100% width', 'formidable' ),
112 112
 						'title' => __( 'Force the field to fill the full space with 100% width.', 'formidable' ),
113
-                    ),
114
-    	            'frm_grid_first' => __( 'First Grid Row', 'formidable' ),
115
-    	            'frm_grid' => __( 'Even Grid Row', 'formidable' ),
116
-    	            'frm_grid_odd' => __( 'Odd Grid Row', 'formidable' ),
113
+					),
114
+					'frm_grid_first' => __( 'First Grid Row', 'formidable' ),
115
+					'frm_grid' => __( 'Even Grid Row', 'formidable' ),
116
+					'frm_grid_odd' => __( 'Odd Grid Row', 'formidable' ),
117 117
 					'frm_two_col' => array( 'label' => __( '2 Col Options', 'formidable' ), 'title' => __( 'Put your radio button or checkbox options into two columns.', 'formidable' ) ),
118 118
 					'frm_three_col' => array( 'label' => __( '3 Col Options', 'formidable' ), 'title' => __( 'Put your radio button or checkbox options into three columns.', 'formidable' ) ),
119 119
 					'frm_four_col' => array( 'label' => __( '4 Col Options', 'formidable' ), 'title' => __( 'Put your radio button or checkbox options into four columns.', 'formidable' ) ),
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 					'frm_scroll_box' => array( 'label' => __( 'Scroll Box', 'formidable' ), 'title' => __( 'If you have many checkbox or radio button options, you may add this class to allow your user to easily scroll through the options.', 'formidable' ) ),
122 122
 					'frm_text_block' => array( 'label' => __( 'Align Option Text', 'formidable' ), 'title' => __( 'If you have a large amount of text in a checkbox or radio button field, use this class to align all the text in a block.', 'formidable' ) ),
123 123
 					'frm_capitalize' => array( 'label' => __( 'Capitalize', 'formidable' ), 'title' => __( 'Automatically capitalize the first letter in each word.', 'formidable' ) ),
124
-    	        );
124
+				);
125 125
 
126 126
 $classes = apply_filters( 'frm_layout_classes', $classes );
127 127
 $col = 'one';
@@ -138,11 +138,11 @@  discard block
 block discarded – undo
138 138
 	} ?>>
139 139
 <?php
140 140
 	if ( empty( $d ) ) {
141
-    	echo $c;
141
+		echo $c;
142 142
 	} else if ( ! is_array( $d ) ) {
143
-    	echo $d;
143
+		echo $d;
144 144
 	} else if ( isset( $d['label'] ) ) {
145
-    	echo $d['label'];
145
+		echo $d['label'];
146 146
 	}
147 147
 ?>
148 148
                     </a>
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
         <ul id="category-tabs" class="category-tabs frm-category-tabs">
18 18
     		<li class="tabs" ><a href="#frm-insert-fields" id="frm_insert_fields_tab"><?php _e( 'Fields', 'formidable' ); ?></a></li>
19 19
     		<li class="hide-if-no-js"><a href="#frm-layout-classes" id="frm_layout_classes_tab" class="frm_help" title="<?php esc_attr_e( 'Open the Field Options and click on the CSS Layout Classes option to enable this tab', 'formidable' ) ?>"><?php _e( 'Layout', 'formidable' ); ?></a></li>
20
-<?php do_action('frm_extra_form_instruction_tabs'); ?>
20
+<?php do_action( 'frm_extra_form_instruction_tabs' ); ?>
21 21
     	</ul>
22 22
 
23 23
     	<div id="frm-insert-fields" class="tabs-panel">
@@ -74,13 +74,13 @@  discard block
 block discarded – undo
74 74
                     <?php
75 75
                 }
76 76
 
77
-                $col_class = empty($col_class) ? 'frm_col_one' : '';
78
-                unset($field_key, $field_type, $field_label);
77
+                $col_class = empty( $col_class ) ? 'frm_col_one' : '';
78
+                unset( $field_key, $field_type, $field_label );
79 79
             } ?>
80 80
             </ul>
81 81
             <div class="clear"></div>
82 82
         </div>
83
-    	<?php do_action('frm_extra_form_instructions'); ?>
83
+    	<?php do_action( 'frm_extra_form_instructions' ); ?>
84 84
 
85 85
     	<div id="frm-layout-classes" class="tabs-panel">
86 86
 			<p class="howto"><?php _e( '1. Click inside the "CSS layout classes" field option in any field.', 'formidable' ) ?><br/>
@@ -132,9 +132,9 @@  discard block
 block discarded – undo
132 132
                     <a href="javascript:void(0);" class="frmbutton frm_insert_code button show_frm_classes<?php
133 133
 	if ( ! empty( $title ) ) {
134 134
 		echo ' frm_help';
135
-	} ?>" data-code="<?php echo esc_attr($c) ?>" <?php
135
+	} ?>" data-code="<?php echo esc_attr( $c ) ?>" <?php
136 136
 	if ( ! empty( $title ) ) {
137
-		?>title="<?php echo esc_attr($title); ?>"<?php
137
+		?>title="<?php echo esc_attr( $title ); ?>"<?php
138 138
 	} ?>>
139 139
 <?php
140 140
 	if ( empty( $d ) ) {
@@ -159,14 +159,14 @@  discard block
 block discarded – undo
159 159
 
160 160
     <div class="submitbox" id="major-publishing-actions">
161 161
         <div id="delete-action">
162
-            <?php echo FrmFormsHelper::delete_trash_link($id, $values['status']); ?>
162
+            <?php echo FrmFormsHelper::delete_trash_link( $id, $values['status'] ); ?>
163 163
         </div>
164 164
 
165 165
         <div id="publishing-action">
166 166
             <form method="post" id="frm_js_build_form">
167 167
             <span class="spinner"></span>
168 168
 		    <input type="hidden" id="frm_compact_fields" name="frm_compact_fields" value="" />
169
-    	    <input type="button" value="<?php echo esc_attr($button) ?>" class="frm_submit_form frm_submit_<?php echo ( isset($values['ajax_load']) && $values['ajax_load'] ) ? '': 'no_'; ?>ajax button-primary button-large" id="frm_submit_side" />
169
+    	    <input type="button" value="<?php echo esc_attr( $button ) ?>" class="frm_submit_form frm_submit_<?php echo ( isset( $values['ajax_load'] ) && $values['ajax_load'] ) ? '' : 'no_'; ?>ajax button-primary button-large" id="frm_submit_side" />
170 170
     	    </form>
171 171
 		</div>
172 172
         <div class="clear"></div>
Please login to merge, or discard this patch.
classes/views/frm-forms/edit.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
 		FrmAppController::get_form_nav( $id, true, 'hide' );
20 20
 	}
21 21
 
22
-    ?>
22
+	?>
23 23
     <div class="frm_form_builder with_frm_style">
24 24
 
25 25
         <p class="frm_hidden frm-no-margin">
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <div class="wrap">
2
-    <h2><?php echo ( $form->is_template ? __( 'Templates', 'formidable' ) : __( 'Build', 'formidable' )); ?>
2
+    <h2><?php echo ( $form->is_template ? __( 'Templates', 'formidable' ) : __( 'Build', 'formidable' ) ); ?>
3 3
         <a href="?page=formidable&amp;frm_action=new" class="add-new-h2"><?php _e( 'Add New', 'formidable' ); ?></a>
4 4
     </h2>
5 5
 
Please login to merge, or discard this patch.
classes/views/styles/_form-messages.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@  discard block
 block discarded – undo
1 1
 <div class="posttypediv">
2 2
 	<ul class="posttype-tabs add-menu-item-tabs">
3 3
 		<li <?php echo ( 'default' == $current_tab ? ' class="tabs"' : '' ); ?>>
4
-    		<a href="<?php echo esc_url('?page=formidable-styles&page-tab=default#tabs-panel-success-msg') ?>" class="nav-tab-link" data-type="tabs-panel-success-msg" ><?php _e( 'Success', 'formidable' ) ?></a>
4
+    		<a href="<?php echo esc_url( '?page=formidable-styles&page-tab=default#tabs-panel-success-msg' ) ?>" class="nav-tab-link" data-type="tabs-panel-success-msg" ><?php _e( 'Success', 'formidable' ) ?></a>
5 5
     	</li>
6 6
 		<li <?php echo ( 'error-msg' == $current_tab ? ' class="tabs"' : '' ); ?>>
7
-			<a href="<?php echo esc_url('?page=formidable-styles&page-tab=error-msge#page-error-msg') ?>" class="nav-tab-link" data-type="tabs-panel-error-msg" ><?php _e( 'Error', 'formidable' ) ?></a>
7
+			<a href="<?php echo esc_url( '?page=formidable-styles&page-tab=error-msge#page-error-msg' ) ?>" class="nav-tab-link" data-type="tabs-panel-error-msg" ><?php _e( 'Error', 'formidable' ) ?></a>
8 8
 		</li>
9 9
 	</ul><!-- .posttype-tabs -->
10 10
 
@@ -14,19 +14,19 @@  discard block
 block discarded – undo
14 14
 	    <div class="field-group field-group-border clearfix">
15 15
         	<label><?php _e( 'BG color', 'formidable' ) ?></label>
16 16
             <div class="hasPicker">
17
-                <input name="<?php echo esc_attr( $frm_style->get_field_name('success_bg_color') ) ?>" id="frm_success_bg_color" class="hex" value="<?php echo esc_attr( $style->post_content['success_bg_color'] ) ?>" type="text" /></div>
17
+                <input name="<?php echo esc_attr( $frm_style->get_field_name( 'success_bg_color' ) ) ?>" id="frm_success_bg_color" class="hex" value="<?php echo esc_attr( $style->post_content['success_bg_color'] ) ?>" type="text" /></div>
18 18
         </div>
19 19
         <div class="field-group clearfix">
20 20
         	<label><?php _e( 'Border', 'formidable' ) ?></label>
21
-        	<input type="text" name="<?php echo esc_attr( $frm_style->get_field_name('success_border_color') ) ?>" id="frm_success_border_color" class="hex" value="<?php echo esc_attr( $style->post_content['success_border_color'] ) ?>" />
21
+        	<input type="text" name="<?php echo esc_attr( $frm_style->get_field_name( 'success_border_color' ) ) ?>" id="frm_success_border_color" class="hex" value="<?php echo esc_attr( $style->post_content['success_border_color'] ) ?>" />
22 22
         </div>
23 23
         <div class="field-group clearfix">
24 24
         	<label><?php _e( 'Text', 'formidable' ) ?></label>
25
-        	<input name="<?php echo esc_attr( $frm_style->get_field_name('success_text_color') ) ?>" id="frm_success_text_color" class="hex" value="<?php echo esc_attr( $style->post_content['success_text_color'] ) ?>" type="text" />
25
+        	<input name="<?php echo esc_attr( $frm_style->get_field_name( 'success_text_color' ) ) ?>" id="frm_success_text_color" class="hex" value="<?php echo esc_attr( $style->post_content['success_text_color'] ) ?>" type="text" />
26 26
         </div>
27 27
         <div class="field-group clearfix">
28 28
         	<label><?php _e( 'Size', 'formidable' ) ?></label>
29
-        	<input type="text" name="<?php echo esc_attr( $frm_style->get_field_name('success_font_size') ) ?>" id="frm_success_font_size" value="<?php echo esc_attr( $style->post_content['success_font_size'] ) ?>"  size="3" />
29
+        	<input type="text" name="<?php echo esc_attr( $frm_style->get_field_name( 'success_font_size' ) ) ?>" id="frm_success_font_size" value="<?php echo esc_attr( $style->post_content['success_font_size'] ) ?>"  size="3" />
30 30
         </div>
31 31
         <div class="clear"></div>
32 32
 	</div><!-- /.tabs-panel -->
@@ -37,21 +37,21 @@  discard block
 block discarded – undo
37 37
 	    <div class="field-group field-group-border clearfix">
38 38
         	<label><?php _e( 'BG color', 'formidable' ) ?></label>
39 39
             <div class="hasPicker">
40
-                <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name('error_bg') ) ?>" id="frm_error_bg" class="hex" value="<?php echo esc_attr($style->post_content['error_bg']) ?>" /></div>
40
+                <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name( 'error_bg' ) ) ?>" id="frm_error_bg" class="hex" value="<?php echo esc_attr( $style->post_content['error_bg'] ) ?>" /></div>
41 41
         </div>
42 42
         <div class="field-group clearfix">
43 43
         	<label><?php _e( 'Border', 'formidable' ) ?></label>
44
-        	<input type="text" name="<?php echo esc_attr( $frm_style->get_field_name('error_border') ) ?>" id="frm_error_border" class="hex" value="<?php echo esc_attr( $style->post_content['error_border'] ) ?>" />
44
+        	<input type="text" name="<?php echo esc_attr( $frm_style->get_field_name( 'error_border' ) ) ?>" id="frm_error_border" class="hex" value="<?php echo esc_attr( $style->post_content['error_border'] ) ?>" />
45 45
         </div>
46 46
         <div class="field-group clearfix">
47 47
 
48 48
         	<label><?php _e( 'Text', 'formidable' ) ?></label>
49
-        	<input type="text" name="<?php echo esc_attr( $frm_style->get_field_name('error_text') ) ?>" id="frm_error_text" class="hex" value="<?php echo esc_attr( $style->post_content['error_text'] ) ?>" />
49
+        	<input type="text" name="<?php echo esc_attr( $frm_style->get_field_name( 'error_text' ) ) ?>" id="frm_error_text" class="hex" value="<?php echo esc_attr( $style->post_content['error_text'] ) ?>" />
50 50
         </div>
51 51
 
52 52
         <div class="field-group clearfix">
53 53
         	<label><?php _e( 'Size', 'formidable' ) ?></label>
54
-        	<input type="text" name="<?php echo esc_attr( $frm_style->get_field_name('error_font_size') ) ?>" id="frm_error_font_size" value="<?php echo esc_attr( $style->post_content['error_font_size'] ) ?>"  size="3" />
54
+        	<input type="text" name="<?php echo esc_attr( $frm_style->get_field_name( 'error_font_size' ) ) ?>" id="frm_error_font_size" value="<?php echo esc_attr( $style->post_content['error_font_size'] ) ?>"  size="3" />
55 55
         </div>
56 56
         <div class="clear"></div>
57 57
 	</div><!-- /.tabs-panel -->
Please login to merge, or discard this patch.
classes/views/styles/_field-sizes.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,42 +1,42 @@
 block discarded – undo
1 1
 <div class="field-group clearfix frm-first-row">
2 2
 	<label><?php _e( 'Size', 'formidable' ) ?></label>
3
-	<input type="text" name="<?php echo esc_attr( $frm_style->get_field_name('field_font_size') ) ?>" id="frm_field_font_size" value="<?php echo esc_attr( $style->post_content['field_font_size'] ) ?>" />
3
+	<input type="text" name="<?php echo esc_attr( $frm_style->get_field_name( 'field_font_size' ) ) ?>" id="frm_field_font_size" value="<?php echo esc_attr( $style->post_content['field_font_size'] ) ?>" />
4 4
 </div>
5 5
 
6 6
 <div class="field-group clearfix frm-first-row">
7 7
 	<label><?php _e( 'Height', 'formidable' ) ?></label>
8
-	<input type="text" name="<?php echo esc_attr( $frm_style->get_field_name('field_height') ) ?>" id="frm_field_height" value="<?php echo esc_attr( $style->post_content['field_height'] ) ?>" />
8
+	<input type="text" name="<?php echo esc_attr( $frm_style->get_field_name( 'field_height' ) ) ?>" id="frm_field_height" value="<?php echo esc_attr( $style->post_content['field_height'] ) ?>" />
9 9
 </div>
10 10
 
11 11
 <div class="field-group clearfix frm-first-row">
12 12
 	<label><?php _e( 'Width', 'formidable' ) ?></label>
13
-	<input type="text" name="<?php echo esc_attr( $frm_style->get_field_name('field_width') ) ?>" id="frm_field_width" value="<?php echo esc_attr( $style->post_content['field_width'] ) ?>" />
13
+	<input type="text" name="<?php echo esc_attr( $frm_style->get_field_name( 'field_width' ) ) ?>" id="frm_field_width" value="<?php echo esc_attr( $style->post_content['field_width'] ) ?>" />
14 14
 </div>
15 15
 
16 16
 <div class="clear"></div>
17 17
 <p class="frm_no_bottom_margin">
18
-    <label><input type="checkbox" name="<?php echo esc_attr( $frm_style->get_field_name('auto_width') ) ?>" id="frm_auto_width" value="1" <?php checked( $style->post_content['auto_width'], 1 ) ?> />
18
+    <label><input type="checkbox" name="<?php echo esc_attr( $frm_style->get_field_name( 'auto_width' ) ) ?>" id="frm_auto_width" value="1" <?php checked( $style->post_content['auto_width'], 1 ) ?> />
19 19
 	<?php _e( 'Automatic Width for drop-down fields', 'formidable' ) ?></label>
20 20
 </p>
21 21
 
22 22
 <div class="field-group clearfix">
23 23
 	<label><?php _e( 'Padding', 'formidable' ) ?></label>
24
-	<input type="text" name="<?php echo esc_attr( $frm_style->get_field_name('field_pad') ) ?>" id="frm_field_pad" value="<?php echo esc_attr( $style->post_content['field_pad'] ) ?>" />
24
+	<input type="text" name="<?php echo esc_attr( $frm_style->get_field_name( 'field_pad' ) ) ?>" id="frm_field_pad" value="<?php echo esc_attr( $style->post_content['field_pad'] ) ?>" />
25 25
 </div>
26 26
 
27 27
 <div class="field-group clearfix">
28 28
 	<label><?php _e( 'Margin', 'formidable' ) ?></label>
29
-	<input type="text" name="<?php echo esc_attr( $frm_style->get_field_name('field_margin') ) ?>" id="frm_field_margin" value="<?php echo esc_attr( $style->post_content['field_margin'] ) ?>" />
29
+	<input type="text" name="<?php echo esc_attr( $frm_style->get_field_name( 'field_margin' ) ) ?>" id="frm_field_margin" value="<?php echo esc_attr( $style->post_content['field_margin'] ) ?>" />
30 30
 </div>
31 31
 
32 32
 <div class="field-group clearfix">
33 33
 	<label><?php _e( 'Corners', 'formidable' ) ?> <span class="frm_help frm_icon_font frm_tooltip_icon" title="<?php esc_attr_e( 'Formidable uses CSS3 border-radius for corner rounding, which is not currently supported by Internet Explorer.', 'formidable' ) ?>" ></span></label>
34
-	<input type="text" value="<?php echo esc_attr( $style->post_content['border_radius'] ) ?>" name="<?php echo esc_attr( $frm_style->get_field_name('border_radius') ) ?>" id="frm_border_radius" />
34
+	<input type="text" value="<?php echo esc_attr( $style->post_content['border_radius'] ) ?>" name="<?php echo esc_attr( $frm_style->get_field_name( 'border_radius' ) ) ?>" id="frm_border_radius" />
35 35
 </div>
36 36
 
37 37
 <div class="field-group clearfix frm-first-row">
38 38
 	<label><?php _e( 'Weight', 'formidable' ) ?></label>
39
-	<select name="<?php echo esc_attr( $frm_style->get_field_name('field_weight') ) ?>" id="frm_field_weight">
39
+	<select name="<?php echo esc_attr( $frm_style->get_field_name( 'field_weight' ) ) ?>" id="frm_field_weight">
40 40
 		<?php foreach ( FrmStyle::get_bold_options() as $value => $name ) { ?>
41 41
 			<option value="<?php echo esc_attr( $value ) ?>" <?php selected( $style->post_content['field_weight'], $value ) ?>><?php echo esc_attr( $name ) ?></option>
42 42
 		<?php } ?>
Please login to merge, or discard this patch.