Completed
Branch uploads (22f1aa)
by Stephanie
03:44
created
classes/helpers/FrmCSVExportHelper.php 3 patches
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-class FrmCSVExportHelper{
3
+class FrmCSVExportHelper {
4 4
 	protected static $separator        = ', ';
5 5
 	protected static $column_separator = ',';
6 6
 	protected static $line_break       = 'return';
Please login to merge, or discard this patch.
Indentation   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -235,50 +235,50 @@  discard block
 block discarded – undo
235 235
 			return $line;
236 236
 		}
237 237
 
238
-        $convmap = false;
238
+		$convmap = false;
239 239
 
240 240
 		switch ( self::$to_encoding ) {
241
-            case 'macintosh':
241
+			case 'macintosh':
242 242
 				// this map was derived from the differences between the MacRoman and UTF-8 Charsets
243 243
 				// Reference:
244 244
 				//   - http://www.alanwood.net/demos/macroman.html
245
-                $convmap = array(
246
-                    256, 304, 0, 0xffff,
247
-                    306, 337, 0, 0xffff,
248
-                    340, 375, 0, 0xffff,
249
-                    377, 401, 0, 0xffff,
250
-                    403, 709, 0, 0xffff,
251
-                    712, 727, 0, 0xffff,
252
-                    734, 936, 0, 0xffff,
253
-                    938, 959, 0, 0xffff,
254
-                    961, 8210, 0, 0xffff,
255
-                    8213, 8215, 0, 0xffff,
256
-                    8219, 8219, 0, 0xffff,
257
-                    8227, 8229, 0, 0xffff,
258
-                    8231, 8239, 0, 0xffff,
259
-                    8241, 8248, 0, 0xffff,
260
-                    8251, 8259, 0, 0xffff,
261
-                    8261, 8363, 0, 0xffff,
262
-                    8365, 8481, 0, 0xffff,
263
-                    8483, 8705, 0, 0xffff,
264
-                    8707, 8709, 0, 0xffff,
265
-                    8711, 8718, 0, 0xffff,
266
-                    8720, 8720, 0, 0xffff,
267
-                    8722, 8729, 0, 0xffff,
268
-                    8731, 8733, 0, 0xffff,
269
-                    8735, 8746, 0, 0xffff,
270
-                    8748, 8775, 0, 0xffff,
271
-                    8777, 8799, 0, 0xffff,
272
-                    8801, 8803, 0, 0xffff,
273
-                    8806, 9673, 0, 0xffff,
274
-                    9675, 63742, 0, 0xffff,
275
-                    63744, 64256, 0, 0xffff,
276
-                );
277
-            break;
278
-            case 'ISO-8859-1':
279
-                $convmap = array( 256, 10000, 0, 0xffff );
280
-            break;
281
-        }
245
+				$convmap = array(
246
+					256, 304, 0, 0xffff,
247
+					306, 337, 0, 0xffff,
248
+					340, 375, 0, 0xffff,
249
+					377, 401, 0, 0xffff,
250
+					403, 709, 0, 0xffff,
251
+					712, 727, 0, 0xffff,
252
+					734, 936, 0, 0xffff,
253
+					938, 959, 0, 0xffff,
254
+					961, 8210, 0, 0xffff,
255
+					8213, 8215, 0, 0xffff,
256
+					8219, 8219, 0, 0xffff,
257
+					8227, 8229, 0, 0xffff,
258
+					8231, 8239, 0, 0xffff,
259
+					8241, 8248, 0, 0xffff,
260
+					8251, 8259, 0, 0xffff,
261
+					8261, 8363, 0, 0xffff,
262
+					8365, 8481, 0, 0xffff,
263
+					8483, 8705, 0, 0xffff,
264
+					8707, 8709, 0, 0xffff,
265
+					8711, 8718, 0, 0xffff,
266
+					8720, 8720, 0, 0xffff,
267
+					8722, 8729, 0, 0xffff,
268
+					8731, 8733, 0, 0xffff,
269
+					8735, 8746, 0, 0xffff,
270
+					8748, 8775, 0, 0xffff,
271
+					8777, 8799, 0, 0xffff,
272
+					8801, 8803, 0, 0xffff,
273
+					8806, 9673, 0, 0xffff,
274
+					9675, 63742, 0, 0xffff,
275
+					63744, 64256, 0, 0xffff,
276
+				);
277
+			break;
278
+			case 'ISO-8859-1':
279
+				$convmap = array( 256, 10000, 0, 0xffff );
280
+			break;
281
+		}
282 282
 
283 283
 		if ( is_array( $convmap ) ) {
284 284
 			$line = mb_encode_numericentity( $line, $convmap, self::$charset );
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
 		}
290 290
 
291 291
 		return self::escape_csv( $line );
292
-    }
292
+	}
293 293
 
294 294
 	/**
295 295
 	 * Escape a " in a csv with another "
Please login to merge, or discard this patch.
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-class FrmCSVExportHelper{
3
+class FrmCSVExportHelper {
4 4
 	protected static $separator        = ', ';
5 5
 	protected static $column_separator = ',';
6 6
 	protected static $line_break       = 'return';
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 		header( 'Content-Description: File Transfer' );
64 64
 		header( 'Content-Disposition: attachment; filename="' . esc_attr( $filename ) . '"' );
65 65
 		header( 'Content-Type: text/csv; charset=' . self::$charset, true );
66
-		header( 'Expires: ' . gmdate( 'D, d M Y H:i:s', mktime( date( 'H' ) + 2, date( 'i' ), date( 's' ), date( 'm' ), date( 'd' ), date('Y' ) ) ) . ' GMT' );
66
+		header( 'Expires: ' . gmdate( 'D, d M Y H:i:s', mktime( date( 'H' ) + 2, date( 'i' ), date( 's' ), date( 'm' ), date( 'd' ), date( 'Y' ) ) ) . ' GMT' );
67 67
 		header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' );
68 68
 		header( 'Cache-Control: no-cache, must-revalidate' );
69 69
 		header( 'Pragma: no-cache' );
@@ -90,21 +90,21 @@  discard block
 block discarded – undo
90 90
 		foreach ( self::$fields as $col ) {
91 91
 			$field_headings = array();
92 92
 			if ( isset( $col->field_options['separate_value'] ) && $col->field_options['separate_value'] && ! in_array( $col->type, array( 'user_id', 'file', 'data', 'date' ) ) ) {
93
-				$field_headings[ $col->id . '_label' ] = strip_tags( $col->name . ' ' . __( '(label)', 'formidable' ) );
93
+				$field_headings[$col->id . '_label'] = strip_tags( $col->name . ' ' . __( '(label)', 'formidable' ) );
94 94
 			}
95 95
 
96
-			$field_headings[ $col->id ] = strip_tags( $col->name );
96
+			$field_headings[$col->id] = strip_tags( $col->name );
97 97
 			$field_headings = apply_filters( 'frm_csv_field_columns', $field_headings, array( 'field' => $col ) );
98 98
 			$headings += $field_headings;
99 99
 		}
100 100
 
101 101
 		if ( self::$comment_count ) {
102
-			for ( $i = 0; $i < self::$comment_count; $i++ ) {
103
-				$headings[ 'comment' . $i ] = __( 'Comment', 'formidable' );
104
-				$headings[ 'comment_user_id' . $i ] = __( 'Comment User', 'formidable' );
105
-				$headings[ 'comment_created_at' . $i ] = __( 'Comment Date', 'formidable' );
102
+			for ( $i = 0; $i < self::$comment_count; $i ++ ) {
103
+				$headings['comment' . $i] = __( 'Comment', 'formidable' );
104
+				$headings['comment_user_id' . $i] = __( 'Comment User', 'formidable' );
105
+				$headings['comment_created_at' . $i] = __( 'Comment Date', 'formidable' );
106 106
 			}
107
-			unset($i);
107
+			unset( $i );
108 108
 		}
109 109
 
110 110
 		$headings['created_at'] = __( 'Timestamp', 'formidable' );
@@ -151,30 +151,30 @@  discard block
 block discarded – undo
151 151
 					continue;
152 152
 				}
153 153
 
154
-				if ( ! isset( $entries[ self::$entry->parent_item_id ]->metas[ $meta_id ] ) ) {
155
-					$entries[ self::$entry->parent_item_id ]->metas[ $meta_id ] = array();
156
-				} else if ( ! is_array( $entries[ self::$entry->parent_item_id ]->metas[ $meta_id ] ) ) {
154
+				if ( ! isset( $entries[self::$entry->parent_item_id]->metas[$meta_id] ) ) {
155
+					$entries[self::$entry->parent_item_id]->metas[$meta_id] = array();
156
+				} else if ( ! is_array( $entries[self::$entry->parent_item_id]->metas[$meta_id] ) ) {
157 157
 					// if the data is here, it should be an array but if this field has collected data
158 158
 					// both while inside and outside of the repeating section, it's possible this is a string
159
-					$entries[ self::$entry->parent_item_id ]->metas[ $meta_id ] = (array) $entries[ self::$entry->parent_item_id ]->metas[ $meta_id ];
159
+					$entries[self::$entry->parent_item_id]->metas[$meta_id] = (array) $entries[self::$entry->parent_item_id]->metas[$meta_id];
160 160
 				}
161 161
 
162 162
 				//add the repeated values
163
-				$entries[ self::$entry->parent_item_id ]->metas[ $meta_id ][] = $meta_value;
163
+				$entries[self::$entry->parent_item_id]->metas[$meta_id][] = $meta_value;
164 164
 			}
165
-			$entries[ self::$entry->parent_item_id ]->metas += self::$entry->metas;
165
+			$entries[self::$entry->parent_item_id]->metas += self::$entry->metas;
166 166
 		}
167 167
 
168 168
 		// add the embedded form id
169
-		if ( ! isset( $entries[ self::$entry->parent_item_id ]->embedded_fields ) ) {
170
-			$entries[ self::$entry->parent_item_id ]->embedded_fields = array();
169
+		if ( ! isset( $entries[self::$entry->parent_item_id]->embedded_fields ) ) {
170
+			$entries[self::$entry->parent_item_id]->embedded_fields = array();
171 171
 		}
172
-		$entries[ self::$entry->parent_item_id ]->embedded_fields[ self::$entry->id ] = self::$entry->form_id;
172
+		$entries[self::$entry->parent_item_id]->embedded_fields[self::$entry->id] = self::$entry->form_id;
173 173
 	}
174 174
 
175 175
 	private static function add_field_values_to_csv( &$row ) {
176 176
 		foreach ( self::$fields as $col ) {
177
-			$field_value = isset( self::$entry->metas[ $col->id ] ) ? self::$entry->metas[ $col->id ] : false;
177
+			$field_value = isset( self::$entry->metas[$col->id] ) ? self::$entry->metas[$col->id] : false;
178 178
 
179 179
 			$field_value = maybe_unserialize( $field_value );
180 180
 			self::add_array_values_to_columns( $row, compact( 'col', 'field_value' ) );
@@ -185,13 +185,13 @@  discard block
 block discarded – undo
185 185
 				$sep_value = FrmEntriesHelper::display_value( $field_value, $col, array(
186 186
 					'type' => $col->type, 'post_id' => self::$entry->post_id, 'show_icon' => false,
187 187
 					'entry_id' => self::$entry->id, 'sep' => self::$separator,
188
-					'embedded_field_id' => ( isset( self::$entry->embedded_fields ) && isset( self::$entry->embedded_fields[ self::$entry->id ] ) ) ? 'form' . self::$entry->embedded_fields[ self::$entry->id ] : 0,
188
+					'embedded_field_id' => ( isset( self::$entry->embedded_fields ) && isset( self::$entry->embedded_fields[self::$entry->id] ) ) ? 'form' . self::$entry->embedded_fields[self::$entry->id] : 0,
189 189
 					) );
190
-				$row[ $col->id . '_label' ] = $sep_value;
190
+				$row[$col->id . '_label'] = $sep_value;
191 191
 				unset( $sep_value );
192 192
 			}
193 193
 
194
-			$row[ $col->id ] = $field_value;
194
+			$row[$col->id] = $field_value;
195 195
 
196 196
 			unset( $col, $field_value );
197 197
 		}
@@ -204,8 +204,8 @@  discard block
 block discarded – undo
204 204
 		if ( is_array( $atts['field_value'] ) ) {
205 205
 			foreach ( $atts['field_value'] as $key => $sub_value ) {
206 206
 				$column_key = $atts['col']->id . '_' . $key;
207
-				if ( ! is_numeric( $key ) && isset( self::$headings[ $column_key ] ) ) {
208
-					$row[ $column_key ] = $sub_value;
207
+				if ( ! is_numeric( $key ) && isset( self::$headings[$column_key] ) ) {
208
+					$row[$column_key] = $sub_value;
209 209
 				}
210 210
 			}
211 211
 		}
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
 		$sep = '';
227 227
 
228 228
 		foreach ( self::$headings as $k => $heading ) {
229
-			$row = isset( $rows[ $k ] ) ? $rows[ $k ] : '';
229
+			$row = isset( $rows[$k] ) ? $rows[$k] : '';
230 230
 			if ( is_array( $row ) ) {
231 231
 				// implode the repeated field values
232 232
 				$row = implode( self::$separator, FrmAppHelper::array_flatten( $row, 'reset' ) );
Please login to merge, or discard this patch.
classes/views/xml/import_form.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -87,9 +87,9 @@
 block discarded – undo
87 87
 								} else if ( $form->is_template ) {
88 88
 									echo ' ' . __( '(template)', 'formidable' );
89 89
 								}
90
-                        ?></option>
90
+						?></option>
91 91
                         <?php
92
-                        } ?>
92
+						} ?>
93 93
                         </select>
94 94
                         <p class="howto"><?php _e( 'Hold down the CTRL/Command button to select multiple forms', 'formidable' ); ?></p>
95 95
                     </td>
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -10,16 +10,16 @@  discard block
 block discarded – undo
10 10
     <div class="postbox ">
11 11
     <h3 class="hndle"><span><?php _e( 'Import', 'formidable' ) ?></span></h3>
12 12
     <div class="inside">
13
-        <p class="howto"><?php echo apply_filters('frm_upload_instructions1', __( 'Upload your Formidable XML file to import forms into this site. If your imported form key and creation date match a form on your site, that form will be updated.', 'formidable' )) ?></p>
13
+        <p class="howto"><?php echo apply_filters( 'frm_upload_instructions1', __( 'Upload your Formidable XML file to import forms into this site. If your imported form key and creation date match a form on your site, that form will be updated.', 'formidable' ) ) ?></p>
14 14
         <br/>
15 15
         <form enctype="multipart/form-data" method="post">
16 16
             <input type="hidden" name="frm_action" value="import_xml" />
17
-            <?php wp_nonce_field('import-xml-nonce', 'import-xml'); ?>
18
-            <p><label><?php echo apply_filters('frm_upload_instructions2', __( 'Choose a Formidable XML file', 'formidable' )) ?> (<?php printf(__( 'Maximum size: %s', 'formidable' ), ini_get('upload_max_filesize')) ?>)</label>
17
+            <?php wp_nonce_field( 'import-xml-nonce', 'import-xml' ); ?>
18
+            <p><label><?php echo apply_filters( 'frm_upload_instructions2', __( 'Choose a Formidable XML file', 'formidable' ) ) ?> (<?php printf( __( 'Maximum size: %s', 'formidable' ), ini_get( 'upload_max_filesize' ) ) ?>)</label>
19 19
             <input type="file" name="frm_import_file" size="25" />
20 20
             </p>
21 21
 
22
-            <?php do_action('frm_csv_opts', $forms) ?>
22
+            <?php do_action( 'frm_csv_opts', $forms ) ?>
23 23
 
24 24
             <p class="submit">
25 25
 				<input type="submit" value="<?php esc_attr_e( 'Upload file and import', 'formidable' ) ?>" class="button-primary" />
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     <div class="inside with_frm_style">
36 36
 		<form method="post" action="<?php echo esc_url( admin_url( 'admin-ajax.php' ) ); ?>" id="frm_export_xml">
37 37
             <input type="hidden" name="action" value="frm_export_xml" />
38
-            <?php wp_nonce_field('export-xml-nonce', 'export-xml'); ?>
38
+            <?php wp_nonce_field( 'export-xml-nonce', 'export-xml' ); ?>
39 39
 
40 40
             <table class="form-table">
41 41
                 <tr class="form-field">
Please login to merge, or discard this patch.
classes/models/FrmPointers.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
 	/**
46 46
 	 * Get the singleton instance of this class
47 47
 	 *
48
-	 * @return object
48
+	 * @return FrmPointers
49 49
 	 */
50 50
 	public static function get_instance() {
51 51
 		if ( ! ( self::$instance instanceof self ) ) {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -184,7 +184,7 @@
 block discarded – undo
184 184
 	private function do_page_pointer( $page ) {
185 185
 		$selector = 'h2';
186 186
 
187
-		$pointer = call_user_func( array( $this, $this->admin_pages[ $page ] ) );
187
+		$pointer = call_user_func( array( $this, $this->admin_pages[$page] ) );
188 188
 
189 189
 		$opt_arr = array(
190 190
 			'content'      => $pointer['content'],
Please login to merge, or discard this patch.
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -243,16 +243,16 @@  discard block
 block discarded – undo
243 243
 
244 244
 		return array(
245 245
 			'content'   => '<h3>' . __( 'Forms', 'formidable' ) . '</h3>'
246
-			               . '<p>' . __( 'All your forms will be listed on this page. Create your first form by clicking on the "Add New" button.', 'formidable' ) . '</p>'
247
-			               . '<p><strong>' . __( 'Subscribe to our Newsletter', 'formidable' ) . '</strong><br/>'
248
-			               . sprintf( __( 'If you would like to hear about new features and updates for %1$s, subscribe to our newsletter:', 'formidable' ), 'Formidable' ) . '</p>'
249
-			               . '<form target="_blank" action="//formidablepro.us1.list-manage.com/subscribe/post?u=a4a913790ffb892daacc6f271&amp;id=7e7df15967" method="post" selector="newsletter-form" accept-charset="' . esc_attr( get_bloginfo( 'charset' ) ) . '">'
250
-			               . '<p>'
251
-			               . '<input style="margin: 5px; color:#666" name="EMAIL" value="' . esc_attr( $current_user->user_email ) . '" selector="newsletter-email" placeholder="' . esc_attr__( 'Email', 'formidable' ) . '"/>'
246
+						   . '<p>' . __( 'All your forms will be listed on this page. Create your first form by clicking on the "Add New" button.', 'formidable' ) . '</p>'
247
+						   . '<p><strong>' . __( 'Subscribe to our Newsletter', 'formidable' ) . '</strong><br/>'
248
+						   . sprintf( __( 'If you would like to hear about new features and updates for %1$s, subscribe to our newsletter:', 'formidable' ), 'Formidable' ) . '</p>'
249
+						   . '<form target="_blank" action="//formidablepro.us1.list-manage.com/subscribe/post?u=a4a913790ffb892daacc6f271&amp;id=7e7df15967" method="post" selector="newsletter-form" accept-charset="' . esc_attr( get_bloginfo( 'charset' ) ) . '">'
250
+						   . '<p>'
251
+						   . '<input style="margin: 5px; color:#666" name="EMAIL" value="' . esc_attr( $current_user->user_email ) . '" selector="newsletter-email" placeholder="' . esc_attr__( 'Email', 'formidable' ) . '"/>'
252 252
 						   . '<input type="hidden" name="group[4505]" value="4" />'
253
-			               . '<button type="submit" class="button-primary">' . esc_html__( 'Subscribe', 'formidable' ) . '</button>'
254
-			               . '</p>'
255
-			               . '</form>',
253
+						   . '<button type="submit" class="button-primary">' . esc_html__( 'Subscribe', 'formidable' ) . '</button>'
254
+						   . '</p>'
255
+						   . '</form>',
256 256
 			'next_page' => 'entries',
257 257
 		);
258 258
 	}
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
 	private function entries_pointer() {
266 266
 		return array(
267 267
 			'content'   => '<h3>' . __( 'Entries', 'formidable' ) . '</h3>'
268
-			               . '<p>' . __( 'Each time one of your forms is submitted, an entry is created. You will find every form submission listed here so you will always have a backup if an email fails.', 'formidable' ) . '</p>',
268
+						   . '<p>' . __( 'Each time one of your forms is submitted, an entry is created. You will find every form submission listed here so you will always have a backup if an email fails.', 'formidable' ) . '</p>',
269 269
 			'prev_page' => '',
270 270
 			'next_page' => 'styles',
271 271
 			'selector'  => '.wp-list-table',
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
 	private function styles_pointer() {
282 282
 		return array(
283 283
 			'content'   => '<h3>' . __( 'Styles', 'formidable' ) . '</h3>'
284
-			               . '<p>' . __( 'Want to make changes to the way your forms look? Make all the changes you would like right here, and watch the sample form change before your eyes.', 'formidable' ) . '</p>',
284
+						   . '<p>' . __( 'Want to make changes to the way your forms look? Make all the changes you would like right here, and watch the sample form change before your eyes.', 'formidable' ) . '</p>',
285 285
 			'prev_page' => 'entries',
286 286
 			'next_page' => 'import',
287 287
 			'selector'  => '.general-style',
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
 	private function import_pointer() {
298 298
 		return array(
299 299
 			'content'   => '<h3>' . __( 'Import/Export', 'formidable' ) . '</h3>'
300
-			               . '<p>' . __( 'Import and export forms and styles when copying from one site to another or sharing with someone else. Your entries can be exported to a CSV as well. The Premium version also includes the option to import entries to your site from a CSV.', 'formidable' ) . '</p>',
300
+						   . '<p>' . __( 'Import and export forms and styles when copying from one site to another or sharing with someone else. Your entries can be exported to a CSV as well. The Premium version also includes the option to import entries to your site from a CSV.', 'formidable' ) . '</p>',
301 301
 			'prev_page' => 'styles',
302 302
 			'next_page' => 'settings',
303 303
 			'selector'  => '.inside.with_frm_style',
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
 				. __( 'Turn stylesheets and scripts off, set which user roles have access to change and create forms, setup your reCaptcha, and set default messages for new forms and fields.', 'formidable' )
318 318
 				. '<p><strong>' . __( 'Plugin Licenses', 'formidable' ) . '</strong><br/>'
319 319
 				. sprintf( __( 'Once you&#8217;ve purchased %1$s or any addons, you&#8217;ll have to enter a license key to get access to all of their powerful features. A Plugin Licenses tab will appear here for you to enter your license key.', 'formidable' ), 'Formidable Pro' )
320
-           	    . '</p>',
320
+		   		. '</p>',
321 321
 			'prev_page' => 'import',
322 322
 			'next_page' => 'addons',
323 323
 		);
@@ -331,10 +331,10 @@  discard block
 block discarded – undo
331 331
 	private function addons_pointer() {
332 332
 		return array(
333 333
 			'content'   => '<h3>' . __( 'Addons', 'formidable' ) . '</h3>'
334
-			               . '<p>' . sprintf( __( 'The powerful functions of %1$s can be extended with %2$spremium plugins%3$s. You can read all about the Formidable Premium Plugins %2$shere%3$s.', 'formidable' ), 'Formidable', '<a target="_blank" href="' . esc_url( FrmAppHelper::make_affiliate_url( 'https://formidablepro.com/' ) ) . '">', '</a>' )
334
+						   . '<p>' . sprintf( __( 'The powerful functions of %1$s can be extended with %2$spremium plugins%3$s. You can read all about the Formidable Premium Plugins %2$shere%3$s.', 'formidable' ), 'Formidable', '<a target="_blank" href="' . esc_url( FrmAppHelper::make_affiliate_url( 'https://formidablepro.com/' ) ) . '">', '</a>' )
335 335
 						   . '</p>'
336
-			               . '<p><strong>' . __( 'Like this plugin?', 'formidable' ) . '</strong><br/>' . sprintf( __( 'So, we&#8217;ve come to the end of the tour. If you like the plugin, please %srate it 5 stars on WordPress.org%s!', 'formidable' ), '<a target="_blank" href="https://wordpress.org/plugins/formidable/">', '</a>' ) . '</p>'
337
-			               . '<p>' . sprintf( __( 'Thank you for using our plugin and good luck with your forms!<br/><br/>Best,<br/>Team Formidable - %1$sformidablepro.com%2$s', 'formidable' ), '<a target="_blank" href="' . esc_url( FrmAppHelper::make_affiliate_url( 'https://formidablepro.com/' ) ) . '">', '</a>' ) . '</p>',
336
+						   . '<p><strong>' . __( 'Like this plugin?', 'formidable' ) . '</strong><br/>' . sprintf( __( 'So, we&#8217;ve come to the end of the tour. If you like the plugin, please %srate it 5 stars on WordPress.org%s!', 'formidable' ), '<a target="_blank" href="https://wordpress.org/plugins/formidable/">', '</a>' ) . '</p>'
337
+						   . '<p>' . sprintf( __( 'Thank you for using our plugin and good luck with your forms!<br/><br/>Best,<br/>Team Formidable - %1$sformidablepro.com%2$s', 'formidable' ), '<a target="_blank" href="' . esc_url( FrmAppHelper::make_affiliate_url( 'https://formidablepro.com/' ) ) . '">', '</a>' ) . '</p>',
338 338
 			'prev_page' => 'settings',
339 339
 		);
340 340
 	}
Please login to merge, or discard this patch.
classes/views/styles/_field-colors.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
 				<a href="?page=formidable-styles&page-tab=default#tabs-panel-default-color" class="nav-tab-link" data-type="tabs-panel-default-color"><?php _e( 'Default', 'formidable' ) ?></a>
5 5
 			</li>
6 6
 			<li <?php echo ( 'active-color' == $current_tab ? ' class="tabs"' : '' ); ?>>
7
-				<a href="<?php echo esc_url('?page=formidable-styles&page-tab=active-color#page-active-color') ?>" class="nav-tab-link" data-type="tabs-panel-active-color"><?php _e( 'Active', 'formidable' ) ?></a>
7
+				<a href="<?php echo esc_url( '?page=formidable-styles&page-tab=active-color#page-active-color' ) ?>" class="nav-tab-link" data-type="tabs-panel-active-color"><?php _e( 'Active', 'formidable' ) ?></a>
8 8
 			</li>
9 9
 			<li <?php echo ( 'active-error' == $current_tab ? ' class="tabs"' : '' ); ?>>
10 10
 				<a href="?page=formidable-styles&page-tab=active-error#tabs-panel-active-error" class="nav-tab-link" data-type="tabs-panel-active-error"><?php _e( 'Error', 'formidable' ) ?></a>
@@ -19,34 +19,34 @@  discard block
 block discarded – undo
19 19
 		?>">
20 20
 			<div class="field-group field-group-border clearfix">
21 21
             	<label class="background"><?php _e( 'BG color', 'formidable' ) ?></label>
22
-            	<input type="text" name="<?php echo esc_attr( $frm_style->get_field_name('bg_color') ) ?>" id="frm_bg_color" class="hex" value="<?php echo esc_attr( $style->post_content['bg_color'] ) ?>" />
22
+            	<input type="text" name="<?php echo esc_attr( $frm_style->get_field_name( 'bg_color' ) ) ?>" id="frm_bg_color" class="hex" value="<?php echo esc_attr( $style->post_content['bg_color'] ) ?>" />
23 23
             </div>
24 24
             <div class="field-group clearfix">
25 25
             	<label><?php _e( 'Text', 'formidable' ) ?></label>
26
-            	<input type="text" name="<?php echo esc_attr( $frm_style->get_field_name('text_color') ) ?>" id="frm_text_color" class="hex" value="<?php echo esc_attr( $style->post_content['text_color'] ) ?>" />
26
+            	<input type="text" name="<?php echo esc_attr( $frm_style->get_field_name( 'text_color' ) ) ?>" id="frm_text_color" class="hex" value="<?php echo esc_attr( $style->post_content['text_color'] ) ?>" />
27 27
             </div>
28 28
 
29 29
             <div class="field-group field-group-border clearfix">
30 30
             	<label><?php _e( 'Border', 'formidable' ) ?></label>
31
-            	<input type="text" name="<?php echo esc_attr( $frm_style->get_field_name('border_color') ) ?>" id="frm_border_color" class="hex" value="<?php echo esc_attr( $style->post_content['border_color'] ) ?>" />
31
+            	<input type="text" name="<?php echo esc_attr( $frm_style->get_field_name( 'border_color' ) ) ?>" id="frm_border_color" class="hex" value="<?php echo esc_attr( $style->post_content['border_color'] ) ?>" />
32 32
             </div>
33 33
             <div class="field-group clearfix">
34 34
             	<label><?php _e( 'Thickness', 'formidable' ) ?></label>
35
-            	<input type="text" name="<?php echo esc_attr( $frm_style->get_field_name('field_border_width') ) ?>" id="frm_field_border_width" value="<?php echo esc_attr( $style->post_content['field_border_width'] ) ?>" size="4" />
35
+            	<input type="text" name="<?php echo esc_attr( $frm_style->get_field_name( 'field_border_width' ) ) ?>" id="frm_field_border_width" value="<?php echo esc_attr( $style->post_content['field_border_width'] ) ?>" size="4" />
36 36
             </div>
37 37
             <div class="field-group clearfix">
38 38
 				<label><?php _e( 'Style', 'formidable' ) ?></label>
39
-            	<select name="<?php echo esc_attr( $frm_style->get_field_name('field_border_style') ) ?>" id="frm_field_border_style">
40
-            	    <option value="solid" <?php selected($style->post_content['field_border_style'], 'solid') ?>><?php _e( 'solid', 'formidable' ) ?></option>
41
-            		<option value="dotted" <?php selected($style->post_content['field_border_style'], 'dotted') ?>><?php _e( 'dotted', 'formidable' ) ?></option>
42
-            		<option value="dashed" <?php selected($style->post_content['field_border_style'], 'dashed') ?>><?php _e( 'dashed', 'formidable' ) ?></option>
43
-            		<option value="double" <?php selected($style->post_content['field_border_style'], 'double') ?>><?php _e( 'double', 'formidable' ) ?></option>
39
+            	<select name="<?php echo esc_attr( $frm_style->get_field_name( 'field_border_style' ) ) ?>" id="frm_field_border_style">
40
+            	    <option value="solid" <?php selected( $style->post_content['field_border_style'], 'solid' ) ?>><?php _e( 'solid', 'formidable' ) ?></option>
41
+            		<option value="dotted" <?php selected( $style->post_content['field_border_style'], 'dotted' ) ?>><?php _e( 'dotted', 'formidable' ) ?></option>
42
+            		<option value="dashed" <?php selected( $style->post_content['field_border_style'], 'dashed' ) ?>><?php _e( 'dashed', 'formidable' ) ?></option>
43
+            		<option value="double" <?php selected( $style->post_content['field_border_style'], 'double' ) ?>><?php _e( 'double', 'formidable' ) ?></option>
44 44
             	</select>
45 45
             </div>
46 46
             <div class="clear"></div>
47 47
 			<p class="frm_no_bottom_margin">
48 48
 				<label>
49
-					<input type="checkbox" name="<?php echo esc_attr( $frm_style->get_field_name('remove_box_shadow') ) ?>" id="frm_remove_box_shadow" value="1" <?php checked($style->post_content['remove_box_shadow'], 1) ?> />
49
+					<input type="checkbox" name="<?php echo esc_attr( $frm_style->get_field_name( 'remove_box_shadow' ) ) ?>" id="frm_remove_box_shadow" value="1" <?php checked( $style->post_content['remove_box_shadow'], 1 ) ?> />
50 50
 					<?php _e( 'Remove box shadow', 'formidable' ) ?>
51 51
 				</label>
52 52
 			</p>
@@ -57,16 +57,16 @@  discard block
 block discarded – undo
57 57
 		?>">
58 58
             <div class="field-group field-group-border clearfix">
59 59
             	<label class="background"><?php _e( 'BG color', 'formidable' ) ?></label>
60
-            	<input type="text" name="<?php echo esc_attr( $frm_style->get_field_name('bg_color_active') ) ?>" id="frm_bg_color_active" class="hex" value="<?php echo esc_attr( $style->post_content['bg_color_active'] ) ?>" />
60
+            	<input type="text" name="<?php echo esc_attr( $frm_style->get_field_name( 'bg_color_active' ) ) ?>" id="frm_bg_color_active" class="hex" value="<?php echo esc_attr( $style->post_content['bg_color_active'] ) ?>" />
61 61
             </div>
62 62
             <div class="field-group clearfix">
63 63
             	<label><?php _e( 'Border', 'formidable' ) ?></label>
64
-            	<input type="text" name="<?php echo esc_attr( $frm_style->get_field_name('border_color_active') ) ?>" id="frm_border_color_active" class="hex" value="<?php echo esc_attr( $style->post_content['border_color_active'] ) ?>" />
64
+            	<input type="text" name="<?php echo esc_attr( $frm_style->get_field_name( 'border_color_active' ) ) ?>" id="frm_border_color_active" class="hex" value="<?php echo esc_attr( $style->post_content['border_color_active'] ) ?>" />
65 65
             </div>
66 66
 			<div class="clear"></div>
67 67
 			<p class="frm_no_bottom_margin">
68 68
 				<label>
69
-					<input type="checkbox" name="<?php echo esc_attr( $frm_style->get_field_name('remove_box_shadow_active') ) ?>" id="frm_remove_box_shadow_active" value="1" <?php checked($style->post_content['remove_box_shadow_active'], 1) ?> />
69
+					<input type="checkbox" name="<?php echo esc_attr( $frm_style->get_field_name( 'remove_box_shadow_active' ) ) ?>" id="frm_remove_box_shadow_active" value="1" <?php checked( $style->post_content['remove_box_shadow_active'], 1 ) ?> />
70 70
 					<?php _e( 'Remove box shadow', 'formidable' ) ?>
71 71
 				</label>
72 72
 			</p>
@@ -77,28 +77,28 @@  discard block
 block discarded – undo
77 77
 		?>">
78 78
 		    <div class="field-group field-group-border clearfix">
79 79
         	    <label class="background"><?php _e( 'BG color', 'formidable' ) ?></label>
80
-        	    <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name('bg_color_error') ) ?>" id="frm_bg_color_error" class="hex" value="<?php echo esc_attr( $style->post_content['bg_color_error'] ) ?>" />
80
+        	    <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name( 'bg_color_error' ) ) ?>" id="frm_bg_color_error" class="hex" value="<?php echo esc_attr( $style->post_content['bg_color_error'] ) ?>" />
81 81
             </div>
82 82
             <div class="field-group clearfix">
83 83
         	    <label><?php _e( 'Text', 'formidable' ) ?></label>
84
-        	    <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name('text_color_error') ) ?>" id="frm_text_color_error" class="hex" value="<?php echo esc_attr( $style->post_content['text_color_error'] ) ?>" />
84
+        	    <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name( 'text_color_error' ) ) ?>" id="frm_text_color_error" class="hex" value="<?php echo esc_attr( $style->post_content['text_color_error'] ) ?>" />
85 85
             </div>
86 86
 
87 87
             <div class="field-group field-group-border clearfix">
88 88
                 <label><?php _e( 'Border', 'formidable' ) ?></label>
89
-            	<input type="text" name="<?php echo esc_attr( $frm_style->get_field_name('border_color_error') ) ?>" id="frm_border_color_error" class="hex" value="<?php echo esc_attr( $style->post_content['border_color_error'] ) ?>" />
89
+            	<input type="text" name="<?php echo esc_attr( $frm_style->get_field_name( 'border_color_error' ) ) ?>" id="frm_border_color_error" class="hex" value="<?php echo esc_attr( $style->post_content['border_color_error'] ) ?>" />
90 90
             </div>
91 91
             <div class="field-group clearfix">
92 92
             	<label><?php _e( 'Thickness', 'formidable' ) ?></label>
93
-            	<input type="text" name="<?php echo esc_attr( $frm_style->get_field_name('border_width_error') ) ?>" id="frm_border_width_error" value="<?php echo esc_attr( $style->post_content['border_width_error'] ) ?>" size="4" />
93
+            	<input type="text" name="<?php echo esc_attr( $frm_style->get_field_name( 'border_width_error' ) ) ?>" id="frm_border_width_error" value="<?php echo esc_attr( $style->post_content['border_width_error'] ) ?>" size="4" />
94 94
             </div>
95 95
             <div class="field-group clearfix">
96 96
             	<label><?php _e( 'Style', 'formidable' ) ?></label>
97
-            	<select name="<?php echo esc_attr( $frm_style->get_field_name('border_style_error') ) ?>" id="frm_border_style_error">
98
-            	    <option value="solid" <?php selected($style->post_content['border_style_error'], 'solid') ?>><?php _e( 'solid', 'formidable' ) ?></option>
99
-            		<option value="dotted" <?php selected($style->post_content['border_style_error'], 'dotted') ?>><?php _e( 'dotted', 'formidable' ) ?></option>
100
-            		<option value="dashed" <?php selected($style->post_content['border_style_error'], 'dashed') ?>><?php _e( 'dashed', 'formidable' ) ?></option>
101
-            		<option value="double" <?php selected($style->post_content['border_style_error'], 'double') ?>><?php _e( 'double', 'formidable' ) ?></option>
97
+            	<select name="<?php echo esc_attr( $frm_style->get_field_name( 'border_style_error' ) ) ?>" id="frm_border_style_error">
98
+            	    <option value="solid" <?php selected( $style->post_content['border_style_error'], 'solid' ) ?>><?php _e( 'solid', 'formidable' ) ?></option>
99
+            		<option value="dotted" <?php selected( $style->post_content['border_style_error'], 'dotted' ) ?>><?php _e( 'dotted', 'formidable' ) ?></option>
100
+            		<option value="dashed" <?php selected( $style->post_content['border_style_error'], 'dashed' ) ?>><?php _e( 'dashed', 'formidable' ) ?></option>
101
+            		<option value="double" <?php selected( $style->post_content['border_style_error'], 'double' ) ?>><?php _e( 'double', 'formidable' ) ?></option>
102 102
             	</select>
103 103
             </div>
104 104
 
@@ -110,16 +110,16 @@  discard block
 block discarded – undo
110 110
 		?>">
111 111
 		    <div class="field-group field-group-border clearfix">
112 112
         	    <label class="background"><?php _e( 'BG color', 'formidable' ) ?></label>
113
-        	    <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name('bg_color_disabled') ) ?>" id="frm_bg_color_disabled" class="hex" value="<?php echo esc_attr( $style->post_content['bg_color_disabled'] ) ?>" />
113
+        	    <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name( 'bg_color_disabled' ) ) ?>" id="frm_bg_color_disabled" class="hex" value="<?php echo esc_attr( $style->post_content['bg_color_disabled'] ) ?>" />
114 114
             </div>
115 115
             <div class="field-group clearfix">
116 116
         	    <label><?php _e( 'Text', 'formidable' ) ?></label>
117
-        	    <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name('text_color_disabled') ) ?>" id="frm_text_color_disabled" class="hex" value="<?php echo esc_attr( $style->post_content['text_color_disabled'] ) ?>" />
117
+        	    <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name( 'text_color_disabled' ) ) ?>" id="frm_text_color_disabled" class="hex" value="<?php echo esc_attr( $style->post_content['text_color_disabled'] ) ?>" />
118 118
             </div>
119 119
 
120 120
             <div class="field-group clearfix">
121 121
                 <label><?php _e( 'Border', 'formidable' ) ?></label>
122
-            	<input type="text" name="<?php echo esc_attr( $frm_style->get_field_name('border_color_disabled') ) ?>" id="frm_border_color_disabled" class="hex" value="<?php echo esc_attr( $style->post_content['border_color_disabled'] ) ?>" />
122
+            	<input type="text" name="<?php echo esc_attr( $frm_style->get_field_name( 'border_color_disabled' ) ) ?>" id="frm_border_color_disabled" class="hex" value="<?php echo esc_attr( $style->post_content['border_color_disabled'] ) ?>" />
123 123
             </div>
124 124
             <div class="clear"></div>
125 125
 		</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 $name ?></option>
42 42
 		<?php } ?>
Please login to merge, or discard this patch.
classes/views/styles/_general.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -1,59 +1,59 @@
 block discarded – undo
1 1
 <p>
2
-    <label><input type="checkbox" name="<?php echo esc_attr( $frm_style->get_field_name('center_form') ) ?>" id="frm_center_form" value="1" <?php checked($style->post_content['center_form'], 1) ?> />
2
+    <label><input type="checkbox" name="<?php echo esc_attr( $frm_style->get_field_name( 'center_form' ) ) ?>" id="frm_center_form" value="1" <?php checked( $style->post_content['center_form'], 1 ) ?> />
3 3
 	    <?php _e( 'Center form on page', 'formidable' ) ?> <span class="frm_help frm_icon_font frm_tooltip_icon" title="<?php esc_attr_e( 'This will center your form on the page where it is published if the form width is less than the available width on the page.', 'formidable' ) ?>" ></span>
4 4
 	</label>
5 5
 </p>
6 6
 
7 7
 <div class="field-group clearfix frm-first-row">
8 8
 	<label><?php _e( 'Alignment', 'formidable' ) ?></label>
9
-	<select name="<?php echo esc_attr( $frm_style->get_field_name('form_align') ) ?>" id="frm_form_align">
10
-		<option value="left" <?php selected($style->post_content['form_align'], 'left') ?>><?php _e( 'left', 'formidable' ) ?></option>
11
-		<option value="right" <?php selected($style->post_content['form_align'], 'right') ?>><?php _e( 'right', 'formidable' ) ?></option>
12
-		<option value="center" <?php selected($style->post_content['form_align'], 'center') ?>><?php _e( 'center', 'formidable' ) ?></option>
9
+	<select name="<?php echo esc_attr( $frm_style->get_field_name( 'form_align' ) ) ?>" id="frm_form_align">
10
+		<option value="left" <?php selected( $style->post_content['form_align'], 'left' ) ?>><?php _e( 'left', 'formidable' ) ?></option>
11
+		<option value="right" <?php selected( $style->post_content['form_align'], 'right' ) ?>><?php _e( 'right', 'formidable' ) ?></option>
12
+		<option value="center" <?php selected( $style->post_content['form_align'], 'center' ) ?>><?php _e( 'center', 'formidable' ) ?></option>
13 13
 	</select>
14 14
 </div>
15 15
 
16 16
 <div class="field-group clearfix frm-first-row">
17 17
 	<label><?php _e( 'Max Width', 'formidable' ) ?></label>
18
-	<input type="text" name="<?php echo esc_attr( $frm_style->get_field_name('form_width') ) ?>" value="<?php echo esc_attr( $style->post_content['form_width'] ) ?>"/>
18
+	<input type="text" name="<?php echo esc_attr( $frm_style->get_field_name( 'form_width' ) ) ?>" value="<?php echo esc_attr( $style->post_content['form_width'] ) ?>"/>
19 19
 </div>
20 20
 
21 21
 <div class="field-group clearfix frm-first-row">
22 22
 	<label><?php _e( 'Background', 'formidable' ) ?></label>
23
-	<input type="text" name="<?php echo esc_attr( $frm_style->get_field_name('fieldset_bg_color') ) ?>" id="frm_fieldset_bg_color" class="hex" value="<?php echo esc_attr( $style->post_content['fieldset_bg_color'] ) ?>" size="4" />
23
+	<input type="text" name="<?php echo esc_attr( $frm_style->get_field_name( 'fieldset_bg_color' ) ) ?>" id="frm_fieldset_bg_color" class="hex" value="<?php echo esc_attr( $style->post_content['fieldset_bg_color'] ) ?>" size="4" />
24 24
 </div>
25 25
 
26 26
 <div class="field-group field-group-border clearfix">
27 27
 	<label><?php _e( 'Border', 'formidable' ) ?></label>
28
-	<input type="text" name="<?php echo esc_attr( $frm_style->get_field_name('fieldset') ) ?>" id="frm_fieldset" value="<?php echo esc_attr( $style->post_content['fieldset'] ) ?>" size="4" />
28
+	<input type="text" name="<?php echo esc_attr( $frm_style->get_field_name( 'fieldset' ) ) ?>" id="frm_fieldset" value="<?php echo esc_attr( $style->post_content['fieldset'] ) ?>" size="4" />
29 29
 </div>
30 30
 
31 31
 <div class="field-group clearfix">
32 32
 	<label><?php _e( 'Color', 'formidable' ) ?></label>
33
-	<input type="text" name="<?php echo esc_attr( $frm_style->get_field_name('fieldset_color') ) ?>" id="frm_fieldset_color" class="hex" value="<?php echo esc_attr( $style->post_content['fieldset_color'] ) ?>" />
33
+	<input type="text" name="<?php echo esc_attr( $frm_style->get_field_name( 'fieldset_color' ) ) ?>" id="frm_fieldset_color" class="hex" value="<?php echo esc_attr( $style->post_content['fieldset_color'] ) ?>" />
34 34
 </div>
35 35
 
36 36
 <div class="field-group clearfix">
37 37
 	<label><?php _e( 'Padding', 'formidable' ) ?></label>
38
-	<input type="text" name="<?php echo esc_attr( $frm_style->get_field_name('fieldset_padding') ) ?>" id="frm_fieldset_padding" value="<?php echo esc_attr( $style->post_content['fieldset_padding'] ) ?>" size="4" />
38
+	<input type="text" name="<?php echo esc_attr( $frm_style->get_field_name( 'fieldset_padding' ) ) ?>" id="frm_fieldset_padding" value="<?php echo esc_attr( $style->post_content['fieldset_padding'] ) ?>" size="4" />
39 39
 </div>
40 40
 
41 41
 <div id="frm_gen_font_box" class="field-group clearfix">
42 42
 	<label><?php _e( 'Font Family', 'formidable' ) ?></label>
43
-	<input type="text" name="<?php echo esc_attr( $frm_style->get_field_name('font') ) ?>" id="frm_font" value="<?php echo esc_attr( $style->post_content['font'] ) ?>"  class="frm_full_width" />
43
+	<input type="text" name="<?php echo esc_attr( $frm_style->get_field_name( 'font' ) ) ?>" id="frm_font" value="<?php echo esc_attr( $style->post_content['font'] ) ?>"  class="frm_full_width" />
44 44
 </div>
45 45
 
46 46
 <div class="field-group clearfix frm-half">
47 47
 	<label><?php _e( 'Direction', 'formidable' ) ?></label>
48
-	<select name="<?php echo esc_attr( $frm_style->get_field_name('direction') ) ?>" id="frm_direction">
49
-		<option value="ltr" <?php selected($style->post_content['direction'], 'ltr') ?>><?php _e( 'Left to Right', 'formidable' ) ?></option>
50
-		<option value="rtl" <?php selected($style->post_content['direction'], 'rtl') ?>><?php _e( 'Right to Left', 'formidable' ) ?></option>
48
+	<select name="<?php echo esc_attr( $frm_style->get_field_name( 'direction' ) ) ?>" id="frm_direction">
49
+		<option value="ltr" <?php selected( $style->post_content['direction'], 'ltr' ) ?>><?php _e( 'Left to Right', 'formidable' ) ?></option>
50
+		<option value="rtl" <?php selected( $style->post_content['direction'], 'rtl' ) ?>><?php _e( 'Right to Left', 'formidable' ) ?></option>
51 51
 	</select>
52 52
 </div>
53 53
 
54 54
 <div class="clear"></div>
55 55
 <p class="frm_no_bottom_margin">
56
-    <label><input type="checkbox" name="<?php echo esc_attr( $frm_style->get_field_name('important_style') ) ?>" id="frm_important_style" value="1" <?php checked($style->post_content['important_style'], 1) ?> />
56
+    <label><input type="checkbox" name="<?php echo esc_attr( $frm_style->get_field_name( 'important_style' ) ) ?>" id="frm_important_style" value="1" <?php checked( $style->post_content['important_style'], 1 ) ?> />
57 57
 	    <?php _e( 'Override theme styling', 'formidable' ) ?> <span class="frm_help frm_icon_font frm_tooltip_icon" title="<?php esc_attr_e( 'This will add !important to many of the lines in the Formidable styling to make sure it will be used.', 'formidable' ) ?>" ></span>
58 58
 	</label>
59 59
 </p>
Please login to merge, or discard this patch.
classes/controllers/FrmStylesController.php 3 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -121,6 +121,9 @@
 block discarded – undo
121 121
 		$stylesheet_urls['formidable'] = $url;
122 122
 	}
123 123
 
124
+	/**
125
+	 * @param string $version
126
+	 */
124 127
 	private static function get_css_version( $css_key, $version ) {
125 128
 		if ( 'formidable' == $css_key ) {
126 129
 			$this_version = get_option( 'frm_last_style_update' );
Please login to merge, or discard this patch.
Spacing   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -41,23 +41,23 @@  discard block
 block discarded – undo
41 41
     }
42 42
 
43 43
     public static function menu() {
44
-		add_submenu_page('formidable', 'Formidable | ' . __( 'Styles', 'formidable' ), __( 'Styles', 'formidable' ), 'frm_change_settings', 'formidable-styles', 'FrmStylesController::route' );
44
+		add_submenu_page( 'formidable', 'Formidable | ' . __( 'Styles', 'formidable' ), __( 'Styles', 'formidable' ), 'frm_change_settings', 'formidable-styles', 'FrmStylesController::route' );
45 45
     }
46 46
 
47 47
     public static function admin_init() {
48
-        if ( ! FrmAppHelper::is_admin_page('formidable-styles') ) {
48
+        if ( ! FrmAppHelper::is_admin_page( 'formidable-styles' ) ) {
49 49
             return;
50 50
         }
51 51
 
52 52
         self::load_pro_hooks();
53
-        wp_enqueue_script('jquery-ui-datepicker');
53
+        wp_enqueue_script( 'jquery-ui-datepicker' );
54 54
 
55 55
         $version = FrmAppHelper::plugin_version();
56 56
 		wp_enqueue_script( 'jquery-frm-themepicker', FrmAppHelper::plugin_url() . '/js/jquery/jquery-ui-themepicker.js', array( 'jquery' ), $version );
57 57
 
58
-		wp_enqueue_style( 'frm-custom-theme', admin_url('admin-ajax.php?action=frmpro_css' ) );
58
+		wp_enqueue_style( 'frm-custom-theme', admin_url( 'admin-ajax.php?action=frmpro_css' ) );
59 59
 
60
-        $style = apply_filters('frm_style_head', false);
60
+        $style = apply_filters( 'frm_style_head', false );
61 61
         if ( $style ) {
62 62
 			wp_enqueue_style( 'frm-single-custom-theme', admin_url( 'admin-ajax.php?action=frmpro_load_css&flat=1' ) . '&' . http_build_query( $style->post_content ) );
63 63
         }
@@ -143,17 +143,17 @@  discard block
 block discarded – undo
143 143
 	}
144 144
 
145 145
 	public static function new_style( $return = '' ) {
146
-        self::load_styler('default');
146
+        self::load_styler( 'default' );
147 147
     }
148 148
 
149 149
 	public static function duplicate() {
150
-		self::load_styler('default');
150
+		self::load_styler( 'default' );
151 151
 	}
152 152
 
153 153
 	public static function edit( $style_id = false, $message = '' ) {
154 154
         if ( ! $style_id ) {
155 155
 			$style_id = FrmAppHelper::get_param( 'id', '', 'get', 'absint' );
156
-            if ( empty($style_id) ) {
156
+            if ( empty( $style_id ) ) {
157 157
                 $style_id = 'default';
158 158
             }
159 159
         }
@@ -161,12 +161,12 @@  discard block
 block discarded – undo
161 161
         if ( 'default' == $style_id ) {
162 162
             $style = 'default';
163 163
         } else {
164
-            $frm_style = new FrmStyle($style_id);
164
+            $frm_style = new FrmStyle( $style_id );
165 165
             $style = $frm_style->get_one();
166 166
             $style = $style->ID;
167 167
         }
168 168
 
169
-        self::load_styler($style, $message);
169
+        self::load_styler( $style, $message );
170 170
     }
171 171
 
172 172
     public static function save() {
@@ -176,17 +176,17 @@  discard block
 block discarded – undo
176 176
 		$style_nonce = FrmAppHelper::get_post_param( 'frm_style', '', 'sanitize_text_field' );
177 177
 
178 178
 		if ( $post_id !== false && wp_verify_nonce( $style_nonce, 'frm_style_nonce' ) ) {
179
-            $id = $frm_style->update($post_id);
180
-            if ( empty($post_id) && ! empty($id) ) {
179
+            $id = $frm_style->update( $post_id );
180
+            if ( empty( $post_id ) && ! empty( $id ) ) {
181 181
                 // set the post id to the new style so it will be loaded for editing
182
-                $post_id = reset($id);
182
+                $post_id = reset( $id );
183 183
             }
184 184
             // include the CSS that includes this style
185 185
 			echo '<link href="' . esc_url( admin_url( 'admin-ajax.php?action=frmpro_css' ) ) . '" type="text/css" rel="Stylesheet" class="frm-custom-theme" />';
186 186
             $message = __( 'Your styling settings have been saved.', 'formidable' );
187 187
         }
188 188
 
189
-        return self::edit($post_id, $message);
189
+        return self::edit( $post_id, $message );
190 190
     }
191 191
 
192 192
 	public static function load_styler( $style, $message = '' ) {
@@ -195,10 +195,10 @@  discard block
 block discarded – undo
195 195
         $frm_style = new FrmStyle();
196 196
         $styles = $frm_style->get_all();
197 197
 
198
-        if ( is_numeric($style) ) {
199
-            $style = $styles[ $style ];
198
+        if ( is_numeric( $style ) ) {
199
+            $style = $styles[$style];
200 200
         } else if ( 'default' == $style ) {
201
-            $style = $frm_style->get_default_style($styles);
201
+            $style = $frm_style->get_default_style( $styles );
202 202
         }
203 203
 
204 204
         self::add_meta_boxes();
@@ -213,9 +213,9 @@  discard block
 block discarded – undo
213 213
 	private static function manage( $message = '', $forms = array() ) {
214 214
         $frm_style = new FrmStyle();
215 215
         $styles = $frm_style->get_all();
216
-        $default_style = $frm_style->get_default_style($styles);
216
+        $default_style = $frm_style->get_default_style( $styles );
217 217
 
218
-        if ( empty($forms) ) {
218
+        if ( empty( $forms ) ) {
219 219
             $forms = FrmForm::get_published_forms();
220 220
         }
221 221
 
@@ -232,26 +232,26 @@  discard block
 block discarded – undo
232 232
 
233 233
 		$forms = FrmForm::get_published_forms();
234 234
         foreach ( $forms as $form ) {
235
-            if ( $_POST['style'][ $form->id ] == $_POST['prev_style'][ $form->id ] ) {
235
+            if ( $_POST['style'][$form->id] == $_POST['prev_style'][$form->id] ) {
236 236
                 continue;
237 237
             }
238 238
 
239
-            $form->options['custom_style'] = $_POST['style'][ $form->id ];
239
+            $form->options['custom_style'] = $_POST['style'][$form->id];
240 240
 
241 241
 			$wpdb->update( $wpdb->prefix . 'frm_forms', array( 'options' => maybe_serialize( $form->options ) ), array( 'id' => $form->id ) );
242
-            unset($form);
242
+            unset( $form );
243 243
         }
244 244
 
245 245
         $message = __( 'Your form styles have been saved.', 'formidable' );
246
-        return self::manage($message, $forms);
246
+        return self::manage( $message, $forms );
247 247
     }
248 248
 
249 249
     public static function custom_css( $message = '', $style = null ) {
250
-        wp_enqueue_style('codemirror', FrmAppHelper::plugin_url() . '/css/codemirror.css');
251
-        wp_enqueue_script('codemirror', FrmAppHelper::plugin_url() . '/js/codemirror/codemirror.js', array(), '4.7');
250
+        wp_enqueue_style( 'codemirror', FrmAppHelper::plugin_url() . '/css/codemirror.css' );
251
+        wp_enqueue_script( 'codemirror', FrmAppHelper::plugin_url() . '/js/codemirror/codemirror.js', array(), '4.7' );
252 252
         wp_enqueue_script( 'codemirror-css', FrmAppHelper::plugin_url() . '/js/codemirror/css.js', array( 'codemirror' ), '4.7' );
253 253
 
254
-        if ( ! isset($style) ) {
254
+        if ( ! isset( $style ) ) {
255 255
             $frm_style = new FrmStyle();
256 256
             $style = $frm_style->get_default_style();
257 257
         }
@@ -266,11 +266,11 @@  discard block
 block discarded – undo
266 266
 		$post_id = FrmAppHelper::get_post_param( 'ID', false, 'sanitize_text_field' );
267 267
 		$nonce = FrmAppHelper::get_post_param( 'frm_custom_css', '', 'sanitize_text_field' );
268 268
 		if ( wp_verify_nonce( $nonce, 'frm_custom_css_nonce' ) ) {
269
-            $frm_style->update($post_id);
269
+            $frm_style->update( $post_id );
270 270
             $message = __( 'Your styling settings have been saved.', 'formidable' );
271 271
         }
272 272
 
273
-        return self::custom_css($message);
273
+        return self::custom_css( $message );
274 274
     }
275 275
 
276 276
     public static function route() {
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
     }
300 300
 
301 301
     public static function reset_styling() {
302
-		FrmAppHelper::permission_check('frm_change_settings');
302
+		FrmAppHelper::permission_check( 'frm_change_settings' );
303 303
         check_ajax_referer( 'frm_ajax', 'nonce' );
304 304
 
305 305
         $frm_style = new FrmStyle();
@@ -317,8 +317,8 @@  discard block
 block discarded – undo
317 317
 
318 318
         // remove the # from the colors
319 319
         foreach ( $_GET['frm_style_setting']['post_content'] as $k => $v ) {
320
-            if ( ! is_array($v) && strpos($v, '#') === 0 ) {
321
-                $_GET['frm_style_setting']['post_content'][ $k ] = str_replace( '#', '', $v );
320
+            if ( ! is_array( $v ) && strpos( $v, '#' ) === 0 ) {
321
+                $_GET['frm_style_setting']['post_content'][$k] = str_replace( '#', '', $v );
322 322
             }
323 323
         }
324 324
 
@@ -348,18 +348,18 @@  discard block
 block discarded – undo
348 348
 
349 349
         foreach ( $meta_boxes as $nicename => $name ) {
350 350
 			add_meta_box( $nicename . '-style', $name, 'FrmStylesController::include_style_section', self::$screen, 'side', 'default', $nicename );
351
-            unset($nicename, $name);
351
+            unset( $nicename, $name );
352 352
         }
353 353
     }
354 354
 
355 355
 	public static function include_style_section( $atts, $sec ) {
356
-        extract($atts);
356
+        extract( $atts );
357 357
 		$current_tab = FrmAppHelper::simple_get( 'page-tab', 'sanitize_title', 'default' );
358 358
 		include( FrmAppHelper::plugin_path() . '/classes/views/styles/_' . $sec['args'] . '.php' );
359 359
     }
360 360
 
361 361
     public static function load_css() {
362
-        header('Content-type: text/css');
362
+        header( 'Content-type: text/css' );
363 363
 
364 364
         $frm_style = new FrmStyle();
365 365
         $defaults = $frm_style->get_defaults();
@@ -423,7 +423,7 @@  discard block
 block discarded – undo
423 423
             $style = 'default';
424 424
         }
425 425
 
426
-        $frm_style = new FrmStyle($style);
426
+        $frm_style = new FrmStyle( $style );
427 427
         $style = $frm_style->get_one();
428 428
 
429 429
         if ( $style ) {
@@ -437,14 +437,14 @@  discard block
 block discarded – undo
437 437
      * @param string $val
438 438
      */
439 439
 	public static function get_style_val( $val, $form = 'default' ) {
440
-        $style = self::get_form_style($form);
441
-        if ( $style && isset( $style->post_content[ $val ] ) ) {
442
-            return $style->post_content[ $val ];
440
+        $style = self::get_form_style( $form );
441
+        if ( $style && isset( $style->post_content[$val] ) ) {
442
+            return $style->post_content[$val];
443 443
         }
444 444
     }
445 445
 
446 446
 	public static function show_entry_styles( $default_styles ) {
447
-        $frm_style = new FrmStyle('default');
447
+        $frm_style = new FrmStyle( 'default' );
448 448
         $style = $frm_style->get_one();
449 449
 
450 450
         if ( ! $style ) {
@@ -458,15 +458,15 @@  discard block
 block discarded – undo
458 458
             } else if ( 'alt_bg_color' == $name ) {
459 459
                 $setting = 'bg_color_active';
460 460
             }
461
-            $default_styles[ $name ] = $style->post_content[ $setting ];
462
-            unset($name, $val);
461
+            $default_styles[$name] = $style->post_content[$setting];
462
+            unset( $name, $val );
463 463
         }
464 464
 
465 465
         return $default_styles;
466 466
     }
467 467
 
468 468
 	public static function &important_style( $important, $field ) {
469
-        $important = self::get_style_val('important_style', $field['form_id']);
469
+        $important = self::get_style_val( 'important_style', $field['form_id'] );
470 470
         return $important;
471 471
     }
472 472
 
@@ -492,18 +492,18 @@  discard block
 block discarded – undo
492 492
     	$i = 0;
493 493
     	$first_open = false;
494 494
     	do {
495
-			if ( ! isset( $wp_meta_boxes ) || ! isset( $wp_meta_boxes[ $page ] ) || ! isset( $wp_meta_boxes[ $page ][ $context ] ) ) {
495
+			if ( ! isset( $wp_meta_boxes ) || ! isset( $wp_meta_boxes[$page] ) || ! isset( $wp_meta_boxes[$page][$context] ) ) {
496 496
 				break;
497 497
 			}
498 498
 
499 499
     		foreach ( array( 'high', 'core', 'default', 'low' ) as $priority ) {
500
-    			if ( isset( $wp_meta_boxes[ $page ][ $context ][ $priority ] ) ) {
501
-    				foreach ( $wp_meta_boxes[ $page ][ $context ][ $priority ] as $box ) {
500
+    			if ( isset( $wp_meta_boxes[$page][$context][$priority] ) ) {
501
+    				foreach ( $wp_meta_boxes[$page][$context][$priority] as $box ) {
502 502
     					if ( false == $box || ! $box['title'] ) {
503 503
     						continue;
504 504
 						}
505 505
 
506
-    					$i++;
506
+    					$i ++;
507 507
     					$hidden_class = in_array( $box['id'], $hidden ) ? 'hide-if-js' : '';
508 508
 
509 509
     					if ( ! $first_open && empty( $hidden_class ) ) {
Please login to merge, or discard this patch.
Indentation   +302 added lines, -302 removed lines patch added patch discarded remove patch
@@ -1,21 +1,21 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 class FrmStylesController {
4
-    public static $post_type = 'frm_styles';
5
-    public static $screen = 'formidable_page_formidable-styles';
6
-
7
-    public static function load_pro_hooks() {
8
-        if ( FrmAppHelper::pro_is_installed() ) {
9
-            FrmProStylesController::load_pro_hooks();
10
-        }
11
-    }
12
-
13
-    public static function register_post_types() {
14
-        register_post_type( self::$post_type, array(
15
-            'label' => __( 'Styles', 'formidable' ),
16
-            'public' => false,
17
-            'show_ui' => false,
18
-            'capability_type' => 'page',
4
+	public static $post_type = 'frm_styles';
5
+	public static $screen = 'formidable_page_formidable-styles';
6
+
7
+	public static function load_pro_hooks() {
8
+		if ( FrmAppHelper::pro_is_installed() ) {
9
+			FrmProStylesController::load_pro_hooks();
10
+		}
11
+	}
12
+
13
+	public static function register_post_types() {
14
+		register_post_type( self::$post_type, array(
15
+			'label' => __( 'Styles', 'formidable' ),
16
+			'public' => false,
17
+			'show_ui' => false,
18
+			'capability_type' => 'page',
19 19
 			'capabilities' => array(
20 20
 				'edit_post'		=> 'frm_change_settings',
21 21
 				'edit_posts'	=> 'frm_change_settings',
@@ -25,11 +25,11 @@  discard block
 block discarded – undo
25 25
 				'delete_posts'	=> 'frm_change_settings',
26 26
 				'read_private_posts' => 'read_private_posts',
27 27
 			),
28
-            'supports' => array(
28
+			'supports' => array(
29 29
 				'title',
30
-            ),
31
-            'has_archive' => false,
32
-            'labels' => array(
30
+			),
31
+			'has_archive' => false,
32
+			'labels' => array(
33 33
 				'name' => __( 'Styles', 'formidable' ),
34 34
 				'singular_name' => __( 'Style', 'formidable' ),
35 35
 				'menu_name' => __( 'Style', 'formidable' ),
@@ -37,19 +37,19 @@  discard block
 block discarded – undo
37 37
 				'add_new_item' => __( 'Create a New Style', 'formidable' ),
38 38
 				'edit_item'    => __( 'Edit Style', 'formidable' ),
39 39
 			),
40
-        ) );
41
-    }
40
+		) );
41
+	}
42 42
 
43
-    public static function menu() {
43
+	public static function menu() {
44 44
 		add_submenu_page('formidable', 'Formidable | ' . __( 'Styles', 'formidable' ), __( 'Styles', 'formidable' ), 'frm_change_settings', 'formidable-styles', 'FrmStylesController::route' );
45
-    }
45
+	}
46 46
 
47
-    public static function admin_init() {
48
-        if ( ! FrmAppHelper::is_admin_page('formidable-styles') ) {
49
-            return;
50
-        }
47
+	public static function admin_init() {
48
+		if ( ! FrmAppHelper::is_admin_page('formidable-styles') ) {
49
+			return;
50
+		}
51 51
 
52
-        self::load_pro_hooks();
52
+		self::load_pro_hooks();
53 53
 
54 54
 		$style_tab = FrmAppHelper::get_param( 'frm_action', '', 'get', 'sanitize_title' );
55 55
 		if ( $style_tab == 'manage' || $style_tab == 'custom_css' ) {
@@ -57,18 +57,18 @@  discard block
 block discarded – undo
57 57
 			return;
58 58
 		}
59 59
 
60
-        wp_enqueue_script('jquery-ui-datepicker');
60
+		wp_enqueue_script('jquery-ui-datepicker');
61 61
 
62
-        $version = FrmAppHelper::plugin_version();
62
+		$version = FrmAppHelper::plugin_version();
63 63
 		wp_enqueue_script( 'jquery-frm-themepicker', FrmAppHelper::plugin_url() . '/js/jquery/jquery-ui-themepicker.js', array( 'jquery' ), $version );
64 64
 
65 65
 		wp_enqueue_style( 'frm-custom-theme', admin_url('admin-ajax.php?action=frmpro_css' ) );
66 66
 
67
-        $style = apply_filters('frm_style_head', false);
68
-        if ( $style ) {
67
+		$style = apply_filters('frm_style_head', false);
68
+		if ( $style ) {
69 69
 			wp_enqueue_style( 'frm-single-custom-theme', admin_url( 'admin-ajax.php?action=frmpro_load_css&flat=1' ) . '&' . http_build_query( $style->post_content ) );
70
-        }
71
-    }
70
+		}
71
+	}
72 72
 
73 73
 	public static function enqueue_css( $register = 'enqueue' ) {
74 74
 		global $frm_vars;
@@ -162,230 +162,230 @@  discard block
 block discarded – undo
162 162
 	}
163 163
 
164 164
 	public static function new_style( $return = '' ) {
165
-        self::load_styler('default');
166
-    }
165
+		self::load_styler('default');
166
+	}
167 167
 
168 168
 	public static function duplicate() {
169 169
 		self::load_styler('default');
170 170
 	}
171 171
 
172 172
 	public static function edit( $style_id = false, $message = '' ) {
173
-        if ( ! $style_id ) {
173
+		if ( ! $style_id ) {
174 174
 			$style_id = FrmAppHelper::get_param( 'id', '', 'get', 'absint' );
175
-            if ( empty($style_id) ) {
176
-                $style_id = 'default';
177
-            }
178
-        }
179
-
180
-        if ( 'default' == $style_id ) {
181
-            $style = 'default';
182
-        } else {
183
-            $frm_style = new FrmStyle($style_id);
184
-            $style = $frm_style->get_one();
185
-            $style = $style->ID;
186
-        }
187
-
188
-        self::load_styler($style, $message);
189
-    }
190
-
191
-    public static function save() {
192
-        $frm_style = new FrmStyle();
193
-        $message = '';
175
+			if ( empty($style_id) ) {
176
+				$style_id = 'default';
177
+			}
178
+		}
179
+
180
+		if ( 'default' == $style_id ) {
181
+			$style = 'default';
182
+		} else {
183
+			$frm_style = new FrmStyle($style_id);
184
+			$style = $frm_style->get_one();
185
+			$style = $style->ID;
186
+		}
187
+
188
+		self::load_styler($style, $message);
189
+	}
190
+
191
+	public static function save() {
192
+		$frm_style = new FrmStyle();
193
+		$message = '';
194 194
 		$post_id = FrmAppHelper::get_post_param( 'ID', false, 'sanitize_title' );
195 195
 		$style_nonce = FrmAppHelper::get_post_param( 'frm_style', '', 'sanitize_text_field' );
196 196
 
197 197
 		if ( $post_id !== false && wp_verify_nonce( $style_nonce, 'frm_style_nonce' ) ) {
198
-            $id = $frm_style->update($post_id);
199
-            if ( empty($post_id) && ! empty($id) ) {
200
-                // set the post id to the new style so it will be loaded for editing
201
-                $post_id = reset($id);
202
-            }
203
-            // include the CSS that includes this style
198
+			$id = $frm_style->update($post_id);
199
+			if ( empty($post_id) && ! empty($id) ) {
200
+				// set the post id to the new style so it will be loaded for editing
201
+				$post_id = reset($id);
202
+			}
203
+			// include the CSS that includes this style
204 204
 			echo '<link href="' . esc_url( admin_url( 'admin-ajax.php?action=frmpro_css' ) ) . '" type="text/css" rel="Stylesheet" class="frm-custom-theme" />';
205
-            $message = __( 'Your styling settings have been saved.', 'formidable' );
206
-        }
205
+			$message = __( 'Your styling settings have been saved.', 'formidable' );
206
+		}
207 207
 
208
-        return self::edit($post_id, $message);
209
-    }
208
+		return self::edit($post_id, $message);
209
+	}
210 210
 
211 211
 	public static function load_styler( $style, $message = '' ) {
212
-        global $frm_settings;
212
+		global $frm_settings;
213 213
 
214
-        $frm_style = new FrmStyle();
215
-        $styles = $frm_style->get_all();
214
+		$frm_style = new FrmStyle();
215
+		$styles = $frm_style->get_all();
216 216
 
217
-        if ( is_numeric($style) ) {
218
-            $style = $styles[ $style ];
219
-        } else if ( 'default' == $style ) {
220
-            $style = $frm_style->get_default_style($styles);
221
-        }
217
+		if ( is_numeric($style) ) {
218
+			$style = $styles[ $style ];
219
+		} else if ( 'default' == $style ) {
220
+			$style = $frm_style->get_default_style($styles);
221
+		}
222 222
 
223
-        self::add_meta_boxes();
223
+		self::add_meta_boxes();
224 224
 
225 225
 		include( FrmAppHelper::plugin_path() . '/classes/views/styles/show.php' );
226
-    }
226
+	}
227 227
 
228 228
 	/**
229 229
 	 * @param string $message
230 230
 	 * @param array|object $forms
231 231
 	 */
232 232
 	private static function manage( $message = '', $forms = array() ) {
233
-        $frm_style = new FrmStyle();
234
-        $styles = $frm_style->get_all();
235
-        $default_style = $frm_style->get_default_style($styles);
233
+		$frm_style = new FrmStyle();
234
+		$styles = $frm_style->get_all();
235
+		$default_style = $frm_style->get_default_style($styles);
236 236
 
237
-        if ( empty($forms) ) {
238
-            $forms = FrmForm::get_published_forms();
239
-        }
237
+		if ( empty($forms) ) {
238
+			$forms = FrmForm::get_published_forms();
239
+		}
240 240
 
241 241
 		include( FrmAppHelper::plugin_path() . '/classes/views/styles/manage.php' );
242
-    }
242
+	}
243 243
 
244
-    private static function manage_styles() {
244
+	private static function manage_styles() {
245 245
 		$style_nonce = FrmAppHelper::get_post_param( 'frm_manage_style', '', 'sanitize_text_field' );
246 246
 		if ( ! $_POST || ! isset( $_POST['style'] ) || ! wp_verify_nonce( $style_nonce, 'frm_manage_style_nonce' ) ) {
247
-            return self::manage();
248
-        }
247
+			return self::manage();
248
+		}
249 249
 
250
-        global $wpdb;
250
+		global $wpdb;
251 251
 
252 252
 		$forms = FrmForm::get_published_forms();
253
-        foreach ( $forms as $form ) {
254
-            if ( $_POST['style'][ $form->id ] == $_POST['prev_style'][ $form->id ] ) {
255
-                continue;
256
-            }
253
+		foreach ( $forms as $form ) {
254
+			if ( $_POST['style'][ $form->id ] == $_POST['prev_style'][ $form->id ] ) {
255
+				continue;
256
+			}
257 257
 
258
-            $form->options['custom_style'] = $_POST['style'][ $form->id ];
258
+			$form->options['custom_style'] = $_POST['style'][ $form->id ];
259 259
 
260 260
 			$wpdb->update( $wpdb->prefix . 'frm_forms', array( 'options' => maybe_serialize( $form->options ) ), array( 'id' => $form->id ) );
261
-            unset($form);
262
-        }
261
+			unset($form);
262
+		}
263 263
 
264
-        $message = __( 'Your form styles have been saved.', 'formidable' );
265
-        return self::manage($message, $forms);
266
-    }
264
+		$message = __( 'Your form styles have been saved.', 'formidable' );
265
+		return self::manage($message, $forms);
266
+	}
267 267
 
268
-    public static function custom_css( $message = '', $style = null ) {
269
-        wp_enqueue_style('codemirror', FrmAppHelper::plugin_url() . '/css/codemirror.css');
270
-        wp_enqueue_script('codemirror', FrmAppHelper::plugin_url() . '/js/codemirror/codemirror.js', array(), '4.7');
271
-        wp_enqueue_script( 'codemirror-css', FrmAppHelper::plugin_url() . '/js/codemirror/css.js', array( 'codemirror' ), '4.7' );
268
+	public static function custom_css( $message = '', $style = null ) {
269
+		wp_enqueue_style('codemirror', FrmAppHelper::plugin_url() . '/css/codemirror.css');
270
+		wp_enqueue_script('codemirror', FrmAppHelper::plugin_url() . '/js/codemirror/codemirror.js', array(), '4.7');
271
+		wp_enqueue_script( 'codemirror-css', FrmAppHelper::plugin_url() . '/js/codemirror/css.js', array( 'codemirror' ), '4.7' );
272 272
 
273
-        if ( ! isset($style) ) {
274
-            $frm_style = new FrmStyle();
275
-            $style = $frm_style->get_default_style();
276
-        }
273
+		if ( ! isset($style) ) {
274
+			$frm_style = new FrmStyle();
275
+			$style = $frm_style->get_default_style();
276
+		}
277 277
 
278 278
 		include( FrmAppHelper::plugin_path() . '/classes/views/styles/custom_css.php' );
279
-    }
279
+	}
280 280
 
281
-    public static function save_css() {
282
-        $frm_style = new FrmStyle();
281
+	public static function save_css() {
282
+		$frm_style = new FrmStyle();
283 283
 
284
-        $message = '';
284
+		$message = '';
285 285
 		$post_id = FrmAppHelper::get_post_param( 'ID', false, 'sanitize_text_field' );
286 286
 		$nonce = FrmAppHelper::get_post_param( 'frm_custom_css', '', 'sanitize_text_field' );
287 287
 		if ( wp_verify_nonce( $nonce, 'frm_custom_css_nonce' ) ) {
288
-            $frm_style->update($post_id);
289
-            $message = __( 'Your styling settings have been saved.', 'formidable' );
290
-        }
288
+			$frm_style->update($post_id);
289
+			$message = __( 'Your styling settings have been saved.', 'formidable' );
290
+		}
291 291
 
292
-        return self::custom_css($message);
293
-    }
292
+		return self::custom_css($message);
293
+	}
294 294
 
295
-    public static function route() {
295
+	public static function route() {
296 296
 		$action = FrmAppHelper::get_param( 'frm_action', '', 'get', 'sanitize_title' );
297 297
 
298
-        switch ( $action ) {
299
-            case 'edit':
300
-            case 'save':
301
-            case 'manage':
302
-            case 'manage_styles':
303
-            case 'custom_css':
304
-            case 'save_css':
298
+		switch ( $action ) {
299
+			case 'edit':
300
+			case 'save':
301
+			case 'manage':
302
+			case 'manage_styles':
303
+			case 'custom_css':
304
+			case 'save_css':
305 305
 				return self::$action();
306
-            default:
307
-            	do_action( 'frm_style_action_route', $action );
308
-            	if ( apply_filters( 'frm_style_stop_action_route', false, $action ) ) {
309
-                	return;
310
-            	}
306
+			default:
307
+				do_action( 'frm_style_action_route', $action );
308
+				if ( apply_filters( 'frm_style_stop_action_route', false, $action ) ) {
309
+					return;
310
+				}
311 311
 
312
-                if ( 'new_style' == $action || 'duplicate' == $action ) {
313
-                    return self::$action();
314
-                }
312
+				if ( 'new_style' == $action || 'duplicate' == $action ) {
313
+					return self::$action();
314
+				}
315 315
 
316
-                return self::edit();
317
-        }
318
-    }
316
+				return self::edit();
317
+		}
318
+	}
319 319
 
320
-    public static function reset_styling() {
320
+	public static function reset_styling() {
321 321
 		FrmAppHelper::permission_check('frm_change_settings');
322
-        check_ajax_referer( 'frm_ajax', 'nonce' );
322
+		check_ajax_referer( 'frm_ajax', 'nonce' );
323 323
 
324
-        $frm_style = new FrmStyle();
325
-        $defaults = $frm_style->get_defaults();
324
+		$frm_style = new FrmStyle();
325
+		$defaults = $frm_style->get_defaults();
326 326
 
327
-        echo json_encode( $defaults );
328
-        wp_die();
329
-    }
327
+		echo json_encode( $defaults );
328
+		wp_die();
329
+	}
330 330
 
331
-    public static function change_styling() {
332
-        check_ajax_referer( 'frm_ajax', 'nonce' );
331
+	public static function change_styling() {
332
+		check_ajax_referer( 'frm_ajax', 'nonce' );
333 333
 
334
-        $frm_style = new FrmStyle();
335
-        $defaults = $frm_style->get_defaults();
334
+		$frm_style = new FrmStyle();
335
+		$defaults = $frm_style->get_defaults();
336 336
 
337
-        // remove the # from the colors
338
-        foreach ( $_GET['frm_style_setting']['post_content'] as $k => $v ) {
339
-            if ( ! is_array($v) && strpos($v, '#') === 0 ) {
340
-                $_GET['frm_style_setting']['post_content'][ $k ] = str_replace( '#', '', $v );
341
-            }
342
-        }
337
+		// remove the # from the colors
338
+		foreach ( $_GET['frm_style_setting']['post_content'] as $k => $v ) {
339
+			if ( ! is_array($v) && strpos($v, '#') === 0 ) {
340
+				$_GET['frm_style_setting']['post_content'][ $k ] = str_replace( '#', '', $v );
341
+			}
342
+		}
343 343
 
344
-        echo '<style type="text/css">';
344
+		echo '<style type="text/css">';
345 345
 		include( FrmAppHelper::plugin_path() . '/css/_single_theme.css.php' );
346
-        echo '</style>';
347
-        wp_die();
348
-    }
349
-
350
-    private static function add_meta_boxes() {
351
-
352
-        // setup meta boxes
353
-        $meta_boxes = array(
354
-            'general'           => __( 'General', 'formidable' ),
355
-            'form-title'        => __( 'Form Title', 'formidable' ),
356
-            'form-description'  => __( 'Form Description', 'formidable' ),
357
-            'field-labels'      => __( 'Field Labels', 'formidable' ),
358
-            'field-description' => __( 'Field Description', 'formidable' ),
359
-            'field-colors'      => __( 'Field Colors', 'formidable' ),
360
-            'field-sizes'       => __( 'Field Settings', 'formidable' ),
361
-            'check-box-radio-fields' => __( 'Check Box & Radio Fields', 'formidable' ),
362
-            'section-fields'    => __( 'Section Fields', 'formidable' ),
363
-            'date-fields'       => __( 'Date Fields', 'formidable' ),
364
-            'buttons'           => __( 'Buttons', 'formidable' ),
365
-            'form-messages'     => __( 'Form Messages', 'formidable' ),
366
-        );
367
-
368
-        foreach ( $meta_boxes as $nicename => $name ) {
346
+		echo '</style>';
347
+		wp_die();
348
+	}
349
+
350
+	private static function add_meta_boxes() {
351
+
352
+		// setup meta boxes
353
+		$meta_boxes = array(
354
+			'general'           => __( 'General', 'formidable' ),
355
+			'form-title'        => __( 'Form Title', 'formidable' ),
356
+			'form-description'  => __( 'Form Description', 'formidable' ),
357
+			'field-labels'      => __( 'Field Labels', 'formidable' ),
358
+			'field-description' => __( 'Field Description', 'formidable' ),
359
+			'field-colors'      => __( 'Field Colors', 'formidable' ),
360
+			'field-sizes'       => __( 'Field Settings', 'formidable' ),
361
+			'check-box-radio-fields' => __( 'Check Box & Radio Fields', 'formidable' ),
362
+			'section-fields'    => __( 'Section Fields', 'formidable' ),
363
+			'date-fields'       => __( 'Date Fields', 'formidable' ),
364
+			'buttons'           => __( 'Buttons', 'formidable' ),
365
+			'form-messages'     => __( 'Form Messages', 'formidable' ),
366
+		);
367
+
368
+		foreach ( $meta_boxes as $nicename => $name ) {
369 369
 			add_meta_box( $nicename . '-style', $name, 'FrmStylesController::include_style_section', self::$screen, 'side', 'default', $nicename );
370
-            unset($nicename, $name);
371
-        }
372
-    }
370
+			unset($nicename, $name);
371
+		}
372
+	}
373 373
 
374 374
 	public static function include_style_section( $atts, $sec ) {
375
-        extract($atts);
375
+		extract($atts);
376 376
 		$current_tab = FrmAppHelper::simple_get( 'page-tab', 'sanitize_title', 'default' );
377 377
 		include( FrmAppHelper::plugin_path() . '/classes/views/styles/_' . $sec['args'] . '.php' );
378
-    }
378
+	}
379 379
 
380
-    public static function load_css() {
381
-        header('Content-type: text/css');
380
+	public static function load_css() {
381
+		header('Content-type: text/css');
382 382
 
383
-        $frm_style = new FrmStyle();
384
-        $defaults = $frm_style->get_defaults();
383
+		$frm_style = new FrmStyle();
384
+		$defaults = $frm_style->get_defaults();
385 385
 
386 386
 		include( FrmAppHelper::plugin_path() . '/css/_single_theme.css.php' );
387
-        wp_die();
388
-    }
387
+		wp_die();
388
+	}
389 389
 
390 390
 	public static function load_saved_css() {
391 391
 		$css = get_transient( 'frmpro_css' );
@@ -394,142 +394,142 @@  discard block
 block discarded – undo
394 394
 		wp_die();
395 395
 	}
396 396
 
397
-    /**
398
-     * Check if the Formidable styling should be loaded,
399
-     * then enqueue it for the footer
400
-     * @since 2.0
401
-     */
402
-    public static function enqueue_style() {
403
-        global $frm_vars;
404
-
405
-        if ( isset( $frm_vars['css_loaded'] ) && $frm_vars['css_loaded'] ) {
406
-            // the CSS has already been loaded
407
-            return;
408
-        }
409
-
410
-        $frm_settings = FrmAppHelper::get_settings();
411
-        if ( $frm_settings->load_style != 'none' ) {
412
-            wp_enqueue_style( 'formidable' );
413
-            $frm_vars['css_loaded'] = true;
414
-        }
415
-    }
416
-
417
-    // Get the stylesheets for the form settings page
418
-    public static function get_style_opts() {
419
-        $frm_style = new FrmStyle();
420
-        $styles = $frm_style->get_all();
421
-
422
-        return $styles;
423
-    }
424
-
425
-    public static function get_form_style( $form = 'default' ) {
426
-        $style = FrmFormsHelper::get_form_style( $form );
427
-
428
-        if ( empty( $style ) || 1 == $style ) {
429
-            $style = 'default';
430
-        }
431
-
432
-        $frm_style = new FrmStyle( $style );
433
-        return $frm_style->get_one();
434
-    }
435
-
436
-    /**
437
-     * @param string $class
438
-     * @param string $style
439
-     */
397
+	/**
398
+	 * Check if the Formidable styling should be loaded,
399
+	 * then enqueue it for the footer
400
+	 * @since 2.0
401
+	 */
402
+	public static function enqueue_style() {
403
+		global $frm_vars;
404
+
405
+		if ( isset( $frm_vars['css_loaded'] ) && $frm_vars['css_loaded'] ) {
406
+			// the CSS has already been loaded
407
+			return;
408
+		}
409
+
410
+		$frm_settings = FrmAppHelper::get_settings();
411
+		if ( $frm_settings->load_style != 'none' ) {
412
+			wp_enqueue_style( 'formidable' );
413
+			$frm_vars['css_loaded'] = true;
414
+		}
415
+	}
416
+
417
+	// Get the stylesheets for the form settings page
418
+	public static function get_style_opts() {
419
+		$frm_style = new FrmStyle();
420
+		$styles = $frm_style->get_all();
421
+
422
+		return $styles;
423
+	}
424
+
425
+	public static function get_form_style( $form = 'default' ) {
426
+		$style = FrmFormsHelper::get_form_style( $form );
427
+
428
+		if ( empty( $style ) || 1 == $style ) {
429
+			$style = 'default';
430
+		}
431
+
432
+		$frm_style = new FrmStyle( $style );
433
+		return $frm_style->get_one();
434
+	}
435
+
436
+	/**
437
+	 * @param string $class
438
+	 * @param string $style
439
+	 */
440 440
 	public static function get_form_style_class( $class, $style ) {
441
-        if ( 1 == $style ) {
442
-            $style = 'default';
443
-        }
441
+		if ( 1 == $style ) {
442
+			$style = 'default';
443
+		}
444 444
 
445
-        $frm_style = new FrmStyle($style);
446
-        $style = $frm_style->get_one();
445
+		$frm_style = new FrmStyle($style);
446
+		$style = $frm_style->get_one();
447 447
 
448
-        if ( $style ) {
448
+		if ( $style ) {
449 449
 			$class .= ' frm_style_' . $style->post_name;
450
-        }
450
+		}
451 451
 
452
-        return $class;
453
-    }
452
+		return $class;
453
+	}
454 454
 
455
-    /**
456
-     * @param string $val
457
-     */
455
+	/**
456
+	 * @param string $val
457
+	 */
458 458
 	public static function get_style_val( $val, $form = 'default' ) {
459
-        $style = self::get_form_style($form);
460
-        if ( $style && isset( $style->post_content[ $val ] ) ) {
461
-            return $style->post_content[ $val ];
462
-        }
463
-    }
459
+		$style = self::get_form_style($form);
460
+		if ( $style && isset( $style->post_content[ $val ] ) ) {
461
+			return $style->post_content[ $val ];
462
+		}
463
+	}
464 464
 
465 465
 	public static function show_entry_styles( $default_styles ) {
466
-        $frm_style = new FrmStyle('default');
467
-        $style = $frm_style->get_one();
468
-
469
-        if ( ! $style ) {
470
-            return $default_styles;
471
-        }
472
-
473
-        foreach ( $default_styles as $name => $val ) {
474
-            $setting = $name;
475
-            if ( 'border_width' == $name ) {
476
-                $setting = 'field_border_width';
477
-            } else if ( 'alt_bg_color' == $name ) {
478
-                $setting = 'bg_color_active';
479
-            }
480
-            $default_styles[ $name ] = $style->post_content[ $setting ];
481
-            unset($name, $val);
482
-        }
483
-
484
-        return $default_styles;
485
-    }
466
+		$frm_style = new FrmStyle('default');
467
+		$style = $frm_style->get_one();
468
+
469
+		if ( ! $style ) {
470
+			return $default_styles;
471
+		}
472
+
473
+		foreach ( $default_styles as $name => $val ) {
474
+			$setting = $name;
475
+			if ( 'border_width' == $name ) {
476
+				$setting = 'field_border_width';
477
+			} else if ( 'alt_bg_color' == $name ) {
478
+				$setting = 'bg_color_active';
479
+			}
480
+			$default_styles[ $name ] = $style->post_content[ $setting ];
481
+			unset($name, $val);
482
+		}
483
+
484
+		return $default_styles;
485
+	}
486 486
 
487 487
 	public static function &important_style( $important, $field ) {
488
-        $important = self::get_style_val('important_style', $field['form_id']);
489
-        return $important;
490
-    }
488
+		$important = self::get_style_val('important_style', $field['form_id']);
489
+		return $important;
490
+	}
491 491
 
492
-    /**
493
-     * Fallback for WP < 3.6
494
-     */
495
-    public static function do_accordion_sections( $screen, $context, $object ) {
496
-        if ( function_exists( 'do_accordion_sections' ) ) {
497
-            return do_accordion_sections( $screen, $context, $object );
498
-        }
492
+	/**
493
+	 * Fallback for WP < 3.6
494
+	 */
495
+	public static function do_accordion_sections( $screen, $context, $object ) {
496
+		if ( function_exists( 'do_accordion_sections' ) ) {
497
+			return do_accordion_sections( $screen, $context, $object );
498
+		}
499 499
 
500
-    	global $wp_meta_boxes;
500
+		global $wp_meta_boxes;
501 501
 
502
-        $screen = 'formidable_page_formidable-styles';
503
-        $screen = convert_to_screen( $screen );
502
+		$screen = 'formidable_page_formidable-styles';
503
+		$screen = convert_to_screen( $screen );
504 504
 
505
-    	$page = $screen->id;
505
+		$page = $screen->id;
506 506
 
507
-    	$hidden = get_hidden_meta_boxes( $screen );
508
-    	?>
507
+		$hidden = get_hidden_meta_boxes( $screen );
508
+		?>
509 509
     	<div id="side-sortables" class="accordion-container">
510 510
     	<?php
511
-    	$i = 0;
512
-    	$first_open = false;
513
-    	do {
511
+		$i = 0;
512
+		$first_open = false;
513
+		do {
514 514
 			if ( ! isset( $wp_meta_boxes ) || ! isset( $wp_meta_boxes[ $page ] ) || ! isset( $wp_meta_boxes[ $page ][ $context ] ) ) {
515 515
 				break;
516 516
 			}
517 517
 
518
-    		foreach ( array( 'high', 'core', 'default', 'low' ) as $priority ) {
519
-    			if ( isset( $wp_meta_boxes[ $page ][ $context ][ $priority ] ) ) {
520
-    				foreach ( $wp_meta_boxes[ $page ][ $context ][ $priority ] as $box ) {
521
-    					if ( false == $box || ! $box['title'] ) {
522
-    						continue;
518
+			foreach ( array( 'high', 'core', 'default', 'low' ) as $priority ) {
519
+				if ( isset( $wp_meta_boxes[ $page ][ $context ][ $priority ] ) ) {
520
+					foreach ( $wp_meta_boxes[ $page ][ $context ][ $priority ] as $box ) {
521
+						if ( false == $box || ! $box['title'] ) {
522
+							continue;
523 523
 						}
524 524
 
525
-    					$i++;
526
-    					$hidden_class = in_array( $box['id'], $hidden ) ? 'hide-if-js' : '';
525
+						$i++;
526
+						$hidden_class = in_array( $box['id'], $hidden ) ? 'hide-if-js' : '';
527 527
 
528
-    					if ( ! $first_open && empty( $hidden_class ) ) {
529
-    						$first_open = true;
530
-    					}
528
+						if ( ! $first_open && empty( $hidden_class ) ) {
529
+							$first_open = true;
530
+						}
531 531
 
532
-    					?>
532
+						?>
533 533
 						<div class="postbox <?php echo esc_attr( $box['id'] ); ?>">
534 534
 						<div class="handlediv" title="<?php esc_attr_e( 'Click to toggle', 'formidable' ) ?>"><br/></div>
535 535
                         <h3 class='hndle'><span><?php echo esc_html( $box['title'] ); ?></span></h3>
@@ -540,13 +540,13 @@  discard block
 block discarded – undo
540 540
     						</div><!-- .accordion-section-content -->
541 541
     					</div><!-- .postbox -->
542 542
     					<?php
543
-    				}
544
-    			}
545
-    		}
546
-    	} while ( 0 );
547
-    	?>
543
+					}
544
+				}
545
+			}
546
+		} while ( 0 );
547
+		?>
548 548
     	</div><!-- .accordion-container -->
549 549
     	<?php
550
-    	return $i;
551
-    }
550
+		return $i;
551
+	}
552 552
 }
Please login to merge, or discard this patch.
classes/views/addons/list.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,10 +7,10 @@
 block discarded – undo
7 7
 				continue;
8 8
 			}
9 9
 
10
-			if ( isset( $plugin_names[ $addon['info']['slug'] ] ) ) {
11
-				$installed = is_dir( WP_PLUGIN_DIR . '/' . $plugin_names[ $addon['info']['slug'] ] );
10
+			if ( isset( $plugin_names[$addon['info']['slug']] ) ) {
11
+				$installed = is_dir( WP_PLUGIN_DIR . '/' . $plugin_names[$addon['info']['slug']] );
12 12
 			} else {
13
-				$installed = isset( $installed_addons[ $addon['info']['slug'] ] ) || is_dir( WP_PLUGIN_DIR . '/formidable-' . $addon['info']['slug'] );
13
+				$installed = isset( $installed_addons[$addon['info']['slug']] ) || is_dir( WP_PLUGIN_DIR . '/formidable-' . $addon['info']['slug'] );
14 14
 			}
15 15
 			$has_thumbnail = ! empty( $addon['info']['thumbnail'] );
16 16
 			if ( $addon['info']['slug'] == 'formidable-pro' ) {
Please login to merge, or discard this patch.
classes/views/addons/upgrade_to_pro.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
 			<tr>
7 7
 				<th></th>
8 8
 			<?php foreach ( $pro['pricing'] as $name => $price ) {
9
-				$price_id++;
9
+				$price_id ++;
10 10
 				if ( $name == 'smallbusiness' ) {
11 11
 					$name = 'Small Business';
12 12
 				} ?>
@@ -50,9 +50,9 @@  discard block
 block discarded – undo
50 50
 			<tr>
51 51
 				<th>Included AddOns</th>
52 52
 				<td>None</td>
53
-				<td><a href="<?php echo esc_url( FrmAppHelper::make_affiliate_url('https://formidablepro.com/pricing/#addon-lists') ) ?>" target="_blank">Basic Addons</a></td>
54
-				<td><a href="<?php echo esc_url( FrmAppHelper::make_affiliate_url('https://formidablepro.com/pricing/#addon-lists') ) ?>" target="_blank">Advanced Addons</a></td>
55
-				<td><a href="<?php echo esc_url( FrmAppHelper::make_affiliate_url('https://formidablepro.com/pricing/#addon-lists') ) ?>" target="_blank">Enterprise Addons</a></td>
53
+				<td><a href="<?php echo esc_url( FrmAppHelper::make_affiliate_url( 'https://formidablepro.com/pricing/#addon-lists' ) ) ?>" target="_blank">Basic Addons</a></td>
54
+				<td><a href="<?php echo esc_url( FrmAppHelper::make_affiliate_url( 'https://formidablepro.com/pricing/#addon-lists' ) ) ?>" target="_blank">Advanced Addons</a></td>
55
+				<td><a href="<?php echo esc_url( FrmAppHelper::make_affiliate_url( 'https://formidablepro.com/pricing/#addon-lists' ) ) ?>" target="_blank">Enterprise Addons</a></td>
56 56
 			</tr>
57 57
 		</tbody>
58 58
 	</table>
Please login to merge, or discard this patch.