Completed
Push — master ( 3f1f3b...9e8ac8 )
by Stephanie
02:54
created
classes/models/FrmStyle.php 2 patches
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
 	public $id = 0; // the id of the post
5 5
 
6 6
 	/**
7
-	 * @param int|string $id The id of the stylsheet or 'default'
7
+	 * @param integer $id The id of the stylsheet or 'default'
8 8
 	 */
9 9
 	public function __construct( $id = 0 ) {
10 10
         $this->id = $id;
@@ -127,6 +127,9 @@  discard block
 block discarded – undo
127 127
 		set_transient( 'frmpro_css', $css );
128 128
 	}
129 129
 
130
+	/**
131
+	 * @param string $filename
132
+	 */
130 133
 	private function get_css_content( $filename ) {
131 134
 		$css = '/* ' . __( 'WARNING: Any changes made to this file will be lost when your Formidable settings are updated', 'formidable' ) . ' */' . "\n";
132 135
 
Please login to merge, or discard this patch.
Indentation   +226 added lines, -226 removed lines patch added patch discarded remove patch
@@ -7,46 +7,46 @@  discard block
 block discarded – undo
7 7
 	 * @param int|string $id The id of the stylsheet or 'default'
8 8
 	 */
9 9
 	public function __construct( $id = 0 ) {
10
-        $this->id = $id;
11
-    }
10
+		$this->id = $id;
11
+	}
12 12
 
13
-    public function get_new() {
13
+	public function get_new() {
14 14
 		$this->id = 0;
15 15
 
16
-        $max_slug_value = 2147483647;
17
-        $min_slug_value = 37; // we want to have at least 2 characters in the slug
16
+		$max_slug_value = 2147483647;
17
+		$min_slug_value = 37; // we want to have at least 2 characters in the slug
18 18
 		$key = base_convert( rand( $min_slug_value, $max_slug_value ), 10, 36 );
19 19
 
20
-        $style = array(
21
-            'post_type'     => FrmStylesController::$post_type,
22
-            'ID'            => '',
23
-            'post_title'    => __( 'New Style', 'formidable' ),
24
-            'post_name'     => $key,
25
-            'post_content'  => $this->get_defaults(),
26
-            'menu_order'    => '',
27
-            'post_status'   => 'publish',
28
-        );
20
+		$style = array(
21
+			'post_type'     => FrmStylesController::$post_type,
22
+			'ID'            => '',
23
+			'post_title'    => __( 'New Style', 'formidable' ),
24
+			'post_name'     => $key,
25
+			'post_content'  => $this->get_defaults(),
26
+			'menu_order'    => '',
27
+			'post_status'   => 'publish',
28
+		);
29 29
 
30
-        return (object) $style;
31
-    }
30
+		return (object) $style;
31
+	}
32 32
 
33 33
 	public function save( $settings ) {
34 34
 		return FrmDb::save_settings( $settings, 'frm_styles' );
35
-    }
35
+	}
36 36
 
37 37
 	public function duplicate( $id ) {
38
-        // duplicating is a pro feature
39
-    }
38
+		// duplicating is a pro feature
39
+	}
40 40
 
41
-    public function update( $id = 'default' ) {
41
+	public function update( $id = 'default' ) {
42 42
  		$all_instances = $this->get_all();
43 43
 
44 44
  		if ( empty( $id ) ) {
45
- 		     $new_style = (array) $this->get_new();
46
- 		     $all_instances[] = $new_style;
45
+ 			 $new_style = (array) $this->get_new();
46
+ 			 $all_instances[] = $new_style;
47 47
  		}
48 48
 
49
-        $action_ids = array();
49
+		$action_ids = array();
50 50
 
51 51
  		foreach ( $all_instances as $number => $new_instance ) {
52 52
  			$new_instance = stripslashes_deep( (array) $new_instance );
@@ -55,28 +55,28 @@  discard block
 block discarded – undo
55 55
 				$all_instances[ $number ] = $new_instance;
56 56
 
57 57
 				if ( $new_instance['menu_order'] && $_POST && empty( $_POST['prev_menu_order'] ) && isset( $_POST['frm_style_setting']['menu_order'] ) ) {
58
- 			        // this style was set to default, so remove default setting on previous default style
59
- 			        $new_instance['menu_order'] = 0;
58
+ 					// this style was set to default, so remove default setting on previous default style
59
+ 					$new_instance['menu_order'] = 0;
60 60
 					$action_ids[] = $this->save( $new_instance );
61
- 			    }
61
+ 				}
62 62
 
63
- 			    // don't continue if not saving this style
64
- 			    continue;
63
+ 				// don't continue if not saving this style
64
+ 				continue;
65 65
  			}
66 66
 
67 67
  			$new_instance['post_title'] = sanitize_text_field( $_POST['frm_style_setting']['post_title'] );
68 68
  			$new_instance['post_content'] = $_POST['frm_style_setting']['post_content'];
69 69
  			$new_instance['post_type']  = FrmStylesController::$post_type;
70
-            $new_instance['post_status']  = 'publish';
70
+			$new_instance['post_status']  = 'publish';
71 71
 			$new_instance['menu_order']  = isset( $_POST['frm_style_setting']['menu_order'] ) ? absint( $_POST['frm_style_setting']['menu_order'] ) : 0;
72 72
 
73 73
 			if ( empty( $id ) ) {
74
-                $new_instance['post_name'] = $new_instance['post_title'];
75
-            }
74
+				$new_instance['post_name'] = $new_instance['post_title'];
75
+			}
76 76
 
77
-            $default_settings = $this->get_defaults();
77
+			$default_settings = $this->get_defaults();
78 78
 
79
-            foreach ( $default_settings as $setting => $default ) {
79
+			foreach ( $default_settings as $setting => $default ) {
80 80
 				if ( ! isset( $new_instance['post_content'][ $setting ] ) ) {
81 81
 					$new_instance['post_content'][ $setting ] = $default;
82 82
 				}
@@ -85,10 +85,10 @@  discard block
 block discarded – undo
85 85
 					$new_instance['post_content'][ $setting ] = str_replace( '#', '', $new_instance['post_content'][ $setting ] );
86 86
 				} else if ( in_array( $setting, array( 'submit_style', 'important_style', 'auto_width' ) ) && ! isset( $new_instance['post_content'][ $setting ] ) ) {
87 87
 					$new_instance['post_content'][ $setting ] = 0;
88
-                } else if ( $setting == 'font' ) {
89
-                	$new_instance['post_content'][ $setting ] = $this->force_balanced_quotation( $new_instance['post_content'][ $setting ] );
90
-                }
91
-            }
88
+				} else if ( $setting == 'font' ) {
89
+					$new_instance['post_content'][ $setting ] = $this->force_balanced_quotation( $new_instance['post_content'][ $setting ] );
90
+				}
91
+			}
92 92
 
93 93
 			$all_instances[ $number ] = $new_instance;
94 94
 
@@ -118,16 +118,16 @@  discard block
 block discarded – undo
118 118
 		return array_filter( $settings, array( $this, 'is_color' ) );
119 119
 	}
120 120
 
121
-    /**
122
-     * Create static css file
123
-     */
121
+	/**
122
+	 * Create static css file
123
+	 */
124 124
 	public function save_settings() {
125 125
 		$filename = FrmAppHelper::plugin_path() . '/css/custom_theme.css.php';
126 126
 		update_option( 'frm_last_style_update', date( 'njGi' ) );
127 127
 
128 128
 		if ( ! is_file( $filename ) ) {
129
-            return;
130
-        }
129
+			return;
130
+		}
131 131
 
132 132
 		$this->clear_cache();
133 133
 
@@ -149,10 +149,10 @@  discard block
 block discarded – undo
149 149
 		$saving = true;
150 150
 		$frm_style = $this;
151 151
 
152
-        ob_start();
153
-        include( $filename );
152
+		ob_start();
153
+		include( $filename );
154 154
 		$css .= preg_replace( '/\/\*(.|\s)*?\*\//', '', str_replace( array( "\r\n", "\r", "\n", "\t", '    ' ), '', ob_get_contents() ) );
155
-        ob_end_clean();
155
+		ob_end_clean();
156 156
 
157 157
 		return $css;
158 158
 	}
@@ -173,83 +173,83 @@  discard block
 block discarded – undo
173 173
 
174 174
 	public function destroy( $id ) {
175 175
 		return wp_delete_post( $id );
176
-    }
177
-
178
-    public function get_one() {
179
-        if ( 'default' == $this->id ) {
180
-            $style = $this->get_default_style();
181
-            if ( $style ) {
182
-                $this->id = $style->ID;
183
-            } else {
184
-                $this->id = 0;
185
-            }
186
-            return $style;
187
-        }
176
+	}
177
+
178
+	public function get_one() {
179
+		if ( 'default' == $this->id ) {
180
+			$style = $this->get_default_style();
181
+			if ( $style ) {
182
+				$this->id = $style->ID;
183
+			} else {
184
+				$this->id = 0;
185
+			}
186
+			return $style;
187
+		}
188 188
 
189 189
 		$style = get_post( $this->id );
190 190
 
191
-        if ( ! $style ) {
192
-            return $style;
193
-        }
191
+		if ( ! $style ) {
192
+			return $style;
193
+		}
194 194
 
195 195
 		$style->post_content = FrmAppHelper::maybe_json_decode( $style->post_content );
196 196
 
197
-        $default_values = $this->get_defaults();
197
+		$default_values = $this->get_defaults();
198 198
 
199 199
 		// fill default values
200 200
 		$style->post_content = $this->override_defaults( $style->post_content );
201 201
 		$style->post_content = wp_parse_args( $style->post_content, $default_values );
202 202
 
203
-        return $style;
204
-    }
203
+		return $style;
204
+	}
205 205
 
206
-    public function get_all( $orderby = 'title', $order = 'ASC', $limit = 99 ) {
207
-        $post_atts = array(
206
+	public function get_all( $orderby = 'title', $order = 'ASC', $limit = 99 ) {
207
+		$post_atts = array(
208 208
 			'post_type'   => FrmStylesController::$post_type,
209 209
 			'post_status' => 'publish',
210 210
 			'numberposts' => $limit,
211 211
 			'orderby'     => $orderby,
212 212
 			'order'       => $order,
213
-        );
213
+		);
214 214
 
215 215
 		$temp_styles = FrmDb::check_cache( serialize( $post_atts ), 'frm_styles', $post_atts, 'get_posts' );
216 216
 
217 217
 		if ( empty( $temp_styles ) ) {
218
-            global $wpdb;
219
-            // make sure there wasn't a conflict with the query
218
+			global $wpdb;
219
+			// make sure there wasn't a conflict with the query
220 220
 			$query = $wpdb->prepare( 'SELECT * FROM ' . $wpdb->posts . ' WHERE post_type=%s AND post_status=%s ORDER BY post_title ASC LIMIT 99', FrmStylesController::$post_type, 'publish' );
221 221
 			$temp_styles = FrmDb::check_cache( 'frm_backup_style_check', 'frm_styles', $query, 'get_results' );
222 222
 
223 223
 			if ( empty( $temp_styles ) ) {
224
-                // create a new style if there are none
225
-         		$new = $this->get_new();
224
+				// create a new style if there are none
225
+		 		$new = $this->get_new();
226 226
 				$new->post_title = __( 'Formidable Style', 'formidable' );
227 227
 				$new->post_name = $new->post_title;
228
-         		$new->menu_order = 1;
228
+		 		$new->menu_order = 1;
229 229
 				$new = $this->save( (array) $new );
230 230
 				$this->update( 'default' );
231 231
 
232
-                $post_atts['include'] = $new;
232
+				$post_atts['include'] = $new;
233 233
 
234
-                $temp_styles = get_posts( $post_atts );
235
-            }
236
-        }
237
-
238
-        $default_values = $this->get_defaults();
239
-        $default_style = false;
234
+				$temp_styles = get_posts( $post_atts );
235
+			}
236
+		}
240 237
 
241
-        $styles = array();
242
-        foreach ( $temp_styles as $style ) {
243
-            $this->id = $style->ID;
244
-            if ( $style->menu_order ) {
245
-                if ( $default_style ) {
246
-                    // only return one default
247
-                    $style->menu_order = 0;
248
-                } else {
249
-                    // check for a default style
250
-                    $default_style = $style->ID;
251
-                }
252
-            }
238
+		$default_values = $this->get_defaults();
239
+		$default_style = false;
240
+
241
+		$styles = array();
242
+		foreach ( $temp_styles as $style ) {
243
+			$this->id = $style->ID;
244
+			if ( $style->menu_order ) {
245
+				if ( $default_style ) {
246
+					// only return one default
247
+					$style->menu_order = 0;
248
+				} else {
249
+					// check for a default style
250
+					$default_style = $style->ID;
251
+				}
252
+			}
253 253
 
254 254
 			$style->post_content = FrmAppHelper::maybe_json_decode( $style->post_content );
255 255
 
@@ -258,183 +258,183 @@  discard block
 block discarded – undo
258 258
 			$style->post_content = wp_parse_args( $style->post_content, $default_values );
259 259
 
260 260
 			$styles[ $style->ID ] = $style;
261
-        }
261
+		}
262 262
 
263
-        if ( ! $default_style ) {
263
+		if ( ! $default_style ) {
264 264
 			$default_style = reset( $styles );
265 265
 			$styles[ $default_style->ID ]->menu_order = 1;
266
-        }
266
+		}
267 267
 
268
-        return $styles;
269
-    }
268
+		return $styles;
269
+	}
270 270
 
271 271
 	public function get_default_style( $styles = null ) {
272 272
 		if ( ! isset( $styles ) ) {
273 273
 			$styles = $this->get_all( 'menu_order', 'DESC', 1 );
274
-        }
274
+		}
275 275
 
276
-        foreach ( $styles as $style ) {
277
-            if ( $style->menu_order ) {
278
-                return $style;
279
-            }
280
-        }
281
-    }
276
+		foreach ( $styles as $style ) {
277
+			if ( $style->menu_order ) {
278
+				return $style;
279
+			}
280
+		}
281
+	}
282 282
 
283 283
 	public function override_defaults( $settings ) {
284 284
 		if ( ! is_array( $settings ) ) {
285
-	        return $settings;
286
-	    }
285
+			return $settings;
286
+		}
287 287
 
288 288
 		$settings['line_height'] = ( ! isset( $settings['field_height'] ) || $settings['field_height'] == '' || $settings['field_height'] == 'auto' ) ? 'normal' : $settings['field_height'];
289 289
 
290 290
 		if ( ! isset( $settings['form_desc_size'] ) && isset( $settings['description_font_size'] ) ) {
291
-	        $settings['form_desc_size'] = $settings['description_font_size'];
292
-	        $settings['form_desc_color'] = $settings['description_color'];
293
-	        $settings['title_color'] = $settings['label_color'];
294
-	    }
291
+			$settings['form_desc_size'] = $settings['description_font_size'];
292
+			$settings['form_desc_color'] = $settings['description_color'];
293
+			$settings['title_color'] = $settings['label_color'];
294
+		}
295 295
 
296 296
 		if ( ! isset( $settings['section_color'] ) && isset( $settings['label_color'] ) ) {
297
-	        $settings['section_color'] = $settings['label_color'];
298
-	        $settings['section_border_color'] = $settings['border_color'];
299
-	    }
297
+			$settings['section_color'] = $settings['label_color'];
298
+			$settings['section_border_color'] = $settings['border_color'];
299
+		}
300 300
 
301 301
 		if ( ! isset( $settings['submit_hover_bg_color'] ) && isset( $settings['submit_bg_color'] ) ) {
302
-	        $settings['submit_hover_bg_color'] = $settings['submit_bg_color'];
303
-	        $settings['submit_hover_color'] = $settings['submit_text_color'];
304
-	        $settings['submit_hover_border_color'] = $settings['submit_border_color'];
302
+			$settings['submit_hover_bg_color'] = $settings['submit_bg_color'];
303
+			$settings['submit_hover_color'] = $settings['submit_text_color'];
304
+			$settings['submit_hover_border_color'] = $settings['submit_border_color'];
305 305
 
306
-	        $settings['submit_active_bg_color'] = $settings['submit_bg_color'];
307
-	        $settings['submit_active_color'] = $settings['submit_text_color'];
308
-            $settings['submit_active_border_color'] = $settings['submit_border_color'];
309
-	    }
306
+			$settings['submit_active_bg_color'] = $settings['submit_bg_color'];
307
+			$settings['submit_active_color'] = $settings['submit_text_color'];
308
+			$settings['submit_active_border_color'] = $settings['submit_border_color'];
309
+		}
310 310
 
311
-	    return apply_filters( 'frm_override_default_styles', $settings );
311
+		return apply_filters( 'frm_override_default_styles', $settings );
312 312
 	}
313 313
 
314 314
 	public function get_defaults() {
315 315
 		return apply_filters( 'frm_default_style_settings', array(
316
-            'theme_css'         => 'ui-lightness',
317
-            'theme_name'        => 'UI Lightness',
316
+			'theme_css'         => 'ui-lightness',
317
+			'theme_name'        => 'UI Lightness',
318 318
 
319 319
 			'center_form'       => '',
320
-            'form_width'        => '100%',
321
-            'form_align'        => 'left',
322
-            'direction'         => is_rtl() ? 'rtl' : 'ltr',
323
-            'fieldset'          => '0px',
324
-            'fieldset_color'    => '000000',
325
-            'fieldset_padding'  => '0 0 15px 0',
326
-            'fieldset_bg_color' => '',
327
-
328
-            'title_size'        => '20px',
329
-            'title_color'       => '444444',
320
+			'form_width'        => '100%',
321
+			'form_align'        => 'left',
322
+			'direction'         => is_rtl() ? 'rtl' : 'ltr',
323
+			'fieldset'          => '0px',
324
+			'fieldset_color'    => '000000',
325
+			'fieldset_padding'  => '0 0 15px 0',
326
+			'fieldset_bg_color' => '',
327
+
328
+			'title_size'        => '20px',
329
+			'title_color'       => '444444',
330 330
 			'title_margin_top'  => '10px',
331 331
 			'title_margin_bottom' => '10px',
332
-            'form_desc_size'    => '14px',
333
-            'form_desc_color'   => '666666',
332
+			'form_desc_size'    => '14px',
333
+			'form_desc_color'   => '666666',
334 334
 			'form_desc_margin_top' => '10px',
335 335
 			'form_desc_margin_bottom' => '25px',
336 336
 
337
-            'font'              => '"Lucida Grande","Lucida Sans Unicode",Tahoma,sans-serif',
338
-            'font_size'         => '14px',
339
-            'label_color'       => '444444',
340
-            'weight'            => 'bold',
341
-            'position'          => 'none',
342
-            'align'             => 'left',
343
-            'width'             => '150px',
344
-            'required_color'    => 'B94A48',
345
-            'required_weight'   => 'bold',
346
-            'label_padding'     => '0 0 3px 0',
347
-
348
-            'description_font_size' => '12px',
349
-            'description_color' => '666666',
350
-            'description_weight' => 'normal',
351
-            'description_style' => 'normal',
352
-            'description_align' => 'left',
337
+			'font'              => '"Lucida Grande","Lucida Sans Unicode",Tahoma,sans-serif',
338
+			'font_size'         => '14px',
339
+			'label_color'       => '444444',
340
+			'weight'            => 'bold',
341
+			'position'          => 'none',
342
+			'align'             => 'left',
343
+			'width'             => '150px',
344
+			'required_color'    => 'B94A48',
345
+			'required_weight'   => 'bold',
346
+			'label_padding'     => '0 0 3px 0',
347
+
348
+			'description_font_size' => '12px',
349
+			'description_color' => '666666',
350
+			'description_weight' => 'normal',
351
+			'description_style' => 'normal',
352
+			'description_align' => 'left',
353 353
 			'description_margin' => '0',
354 354
 
355
-            'field_font_size'   => '14px',
356
-            'field_height'      => '32px',
357
-            'line_height'       => 'normal',
358
-            'field_width'       => '100%',
359
-            'auto_width'        => false,
360
-            'field_pad'         => '6px 10px',
361
-            'field_margin'      => '20px',
355
+			'field_font_size'   => '14px',
356
+			'field_height'      => '32px',
357
+			'line_height'       => 'normal',
358
+			'field_width'       => '100%',
359
+			'auto_width'        => false,
360
+			'field_pad'         => '6px 10px',
361
+			'field_margin'      => '20px',
362 362
 			'field_weight' => 'normal',
363
-            'text_color'        => '555555',
364
-            //'border_color_hv'   => 'cccccc',
365
-            'border_color'      => 'cccccc',
366
-            'field_border_width' => '1px',
367
-            'field_border_style' => 'solid',
368
-
369
-            'bg_color'          => 'ffffff',
370
-            //'bg_color_hv'       => 'ffffff',
363
+			'text_color'        => '555555',
364
+			//'border_color_hv'   => 'cccccc',
365
+			'border_color'      => 'cccccc',
366
+			'field_border_width' => '1px',
367
+			'field_border_style' => 'solid',
368
+
369
+			'bg_color'          => 'ffffff',
370
+			//'bg_color_hv'       => 'ffffff',
371 371
 			'remove_box_shadow' => '',
372
-            'bg_color_active'   => 'ffffff',
372
+			'bg_color_active'   => 'ffffff',
373 373
 			'border_color_active' => '66afe9',
374 374
 			'remove_box_shadow_active' => '',
375
-            'text_color_error'  => '444444',
376
-            'bg_color_error'    => 'ffffff',
375
+			'text_color_error'  => '444444',
376
+			'bg_color_error'    => 'ffffff',
377 377
 			'border_color_error' => 'B94A48',
378 378
 			'border_width_error' => '1px',
379 379
 			'border_style_error' => 'solid',
380
-            'bg_color_disabled' => 'ffffff',
381
-            'border_color_disabled' => 'E5E5E5',
382
-            'text_color_disabled' => 'A1A1A1',
383
-
384
-            'radio_align'       => 'block',
385
-            'check_align'       => 'block',
386
-            'check_font_size'   => '13px',
387
-            'check_label_color' => '444444',
388
-            'check_weight'      => 'normal',
389
-
390
-            'section_font_size' => '18px',
391
-            'section_color'     => '444444',
392
-            'section_weight'    => 'bold',
393
-            'section_pad'       => '15px 0 3px 0',
394
-            'section_mar_top'   => '15px',
380
+			'bg_color_disabled' => 'ffffff',
381
+			'border_color_disabled' => 'E5E5E5',
382
+			'text_color_disabled' => 'A1A1A1',
383
+
384
+			'radio_align'       => 'block',
385
+			'check_align'       => 'block',
386
+			'check_font_size'   => '13px',
387
+			'check_label_color' => '444444',
388
+			'check_weight'      => 'normal',
389
+
390
+			'section_font_size' => '18px',
391
+			'section_color'     => '444444',
392
+			'section_weight'    => 'bold',
393
+			'section_pad'       => '15px 0 3px 0',
394
+			'section_mar_top'   => '15px',
395 395
 			'section_mar_bottom' => '12px',
396
-            'section_bg_color'  => '',
397
-            'section_border_color' => 'e8e8e8',
398
-            'section_border_width' => '2px',
399
-            'section_border_style' => 'solid',
400
-            'section_border_loc' => '-top',
401
-            'collapse_icon'     => '6',
402
-            'collapse_pos'      => 'after',
403
-            'repeat_icon'       => '1',
404
-
405
-            'submit_style'      => false,
406
-            'submit_font_size'  => '14px',
407
-            'submit_width'      => 'auto',
408
-            'submit_height'     => 'auto',
409
-            'submit_bg_color'   => 'ffffff',
410
-            'submit_border_color' => 'cccccc',
411
-            'submit_border_width' => '1px',
412
-            'submit_text_color' => '444444',
413
-            'submit_weight'     => 'normal',
414
-            'submit_border_radius' => '4px',
415
-            'submit_bg_img'     => '',
416
-            'submit_margin'     => '10px',
417
-            'submit_padding'    => '6px 11px',
418
-            'submit_shadow_color' => 'eeeeee',
419
-            'submit_hover_bg_color' => 'efefef',
420
-            'submit_hover_color' => '444444',
421
-            'submit_hover_border_color' => 'cccccc',
422
-            'submit_active_bg_color' => 'efefef',
423
-            'submit_active_color' => '444444',
424
-            'submit_active_border_color' => 'cccccc',
425
-
426
-            'border_radius'     => '4px',
427
-            'error_bg'          => 'F2DEDE',
428
-            'error_border'      => 'EBCCD1',
429
-            'error_text'        => 'B94A48',
430
-            'error_font_size'   => '14px',
431
-
432
-            'success_bg_color'  => 'DFF0D8',
433
-            'success_border_color' => 'D6E9C6',
434
-            'success_text_color' => '468847',
435
-            'success_font_size' => '14px',
436
-
437
-            'important_style'   => false,
396
+			'section_bg_color'  => '',
397
+			'section_border_color' => 'e8e8e8',
398
+			'section_border_width' => '2px',
399
+			'section_border_style' => 'solid',
400
+			'section_border_loc' => '-top',
401
+			'collapse_icon'     => '6',
402
+			'collapse_pos'      => 'after',
403
+			'repeat_icon'       => '1',
404
+
405
+			'submit_style'      => false,
406
+			'submit_font_size'  => '14px',
407
+			'submit_width'      => 'auto',
408
+			'submit_height'     => 'auto',
409
+			'submit_bg_color'   => 'ffffff',
410
+			'submit_border_color' => 'cccccc',
411
+			'submit_border_width' => '1px',
412
+			'submit_text_color' => '444444',
413
+			'submit_weight'     => 'normal',
414
+			'submit_border_radius' => '4px',
415
+			'submit_bg_img'     => '',
416
+			'submit_margin'     => '10px',
417
+			'submit_padding'    => '6px 11px',
418
+			'submit_shadow_color' => 'eeeeee',
419
+			'submit_hover_bg_color' => 'efefef',
420
+			'submit_hover_color' => '444444',
421
+			'submit_hover_border_color' => 'cccccc',
422
+			'submit_active_bg_color' => 'efefef',
423
+			'submit_active_color' => '444444',
424
+			'submit_active_border_color' => 'cccccc',
425
+
426
+			'border_radius'     => '4px',
427
+			'error_bg'          => 'F2DEDE',
428
+			'error_border'      => 'EBCCD1',
429
+			'error_text'        => 'B94A48',
430
+			'error_font_size'   => '14px',
431
+
432
+			'success_bg_color'  => 'DFF0D8',
433
+			'success_border_color' => 'D6E9C6',
434
+			'success_text_color' => '468847',
435
+			'success_font_size' => '14px',
436
+
437
+			'important_style'   => false,
438 438
 
439 439
 			'progress_bg_color'     => 'dddddd',
440 440
 			'progress_active_color' => 'ffffff',
@@ -444,9 +444,9 @@  discard block
 block discarded – undo
444 444
 			'progress_border_size'  => '2px',
445 445
 			'progress_size'         => '30px',
446 446
 
447
-            'custom_css'        => '',
447
+			'custom_css'        => '',
448 448
 		) );
449
-    }
449
+	}
450 450
 
451 451
 	public function get_field_name( $field_name, $post_field = 'post_content' ) {
452 452
 		return 'frm_style_setting' . ( empty( $post_field ) ? '' : '[' . $post_field . ']' ) . '[' . $field_name . ']';
Please login to merge, or discard this patch.