Completed
Push — master ( b76685...cabca4 )
by
unknown
19s
created
classes/controllers/FrmStylesController.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
 			/**
161 161
 			 * Update the form data on the "Manage Styles" tab after global settings are saved.
162 162
 			 */
163
-			function () {
163
+			function() {
164 164
 				self::manage_styles();
165 165
 			}
166 166
 		);
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
 		$style_id = self::get_style_id_for_styler();
346 346
 
347 347
 		if ( ! $style_id ) {
348
-			$error_args   = array(
348
+			$error_args = array(
349 349
 				'title'      => __( 'No styles', 'formidable' ),
350 350
 				'body'       => __( 'You must have a style to use the Visual Styler.', 'formidable' ),
351 351
 				'cancel_url' => admin_url( 'admin.php?page=formidable' ),
@@ -363,7 +363,7 @@  discard block
 block discarded – undo
363 363
 		$form = FrmForm::getOne( $form_id );
364 364
 
365 365
 		if ( ! is_object( $form ) ) {
366
-			$error_args   = array(
366
+			$error_args = array(
367 367
 				'title'      => __( 'No forms', 'formidable' ),
368 368
 				'body'       => __( 'You must have a form to use the Visual Styler.', 'formidable' ),
369 369
 				'cancel_url' => admin_url( 'admin.php?page=formidable' ),
@@ -439,7 +439,7 @@  discard block
 block discarded – undo
439 439
 
440 440
 		if ( ! $form_id ) {
441 441
 			// Fallback to any form.
442
-			$where   = array(
442
+			$where = array(
443 443
 				'status'         => 'published',
444 444
 				// Make sure it's not a repeater.
445 445
 				'parent_form_id' => array( null, 0 ),
@@ -458,7 +458,7 @@  discard block
 block discarded – undo
458 458
 	private static function disable_admin_page_styling_on_submit_buttons() {
459 459
 		add_filter(
460 460
 			'frm_submit_button_class',
461
-			function ( $classes ) {
461
+			function( $classes ) {
462 462
 				$classes[] = 'frm_no_style_button';
463 463
 				return $classes;
464 464
 			}
@@ -690,13 +690,13 @@  discard block
 block discarded – undo
690 690
 	private static function force_form_style( $style ) {
691 691
 		add_filter(
692 692
 			'frm_add_form_style_class',
693
-			function ( $class ) use ( $style ) {
694
-				$split   = array_filter(
693
+			function( $class ) use ( $style ) {
694
+				$split = array_filter(
695 695
 					explode( ' ', $class ),
696 696
 					/**
697 697
 					 * @param string $class
698 698
 					 */
699
-					function ( $class ) {
699
+					function( $class ) {
700 700
 						return $class && 0 !== strpos( $class, 'frm_style_' );
701 701
 					}
702 702
 				);
@@ -824,11 +824,11 @@  discard block
 block discarded – undo
824 824
 		$forms = FrmForm::get_published_forms();
825 825
 
826 826
 		foreach ( $forms as $form ) {
827
-			if ( ! isset( $_POST['style'] ) || ! isset( $_POST['style'][ $form->id ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
827
+			if ( ! isset( $_POST['style'] ) || ! isset( $_POST['style'][$form->id] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
828 828
 				continue;
829 829
 			}
830 830
 
831
-			$new_style = sanitize_text_field( wp_unslash( $_POST['style'][ $form->id ] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Missing
831
+			$new_style = sanitize_text_field( wp_unslash( $_POST['style'][$form->id] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Missing
832 832
 
833 833
 			$form->options['custom_style'] = $new_style;
834 834
 			$wpdb->update( $wpdb->prefix . 'frm_forms', array( 'options' => maybe_serialize( $form->options ) ), array( 'id' => $form->id ) );
@@ -1279,8 +1279,8 @@  discard block
 block discarded – undo
1279 1279
 	public static function get_style_val( $val, $form = 'default' ) {
1280 1280
 		$style = self::get_form_style( $form );
1281 1281
 
1282
-		if ( $style && isset( $style->post_content[ $val ] ) ) {
1283
-			return $style->post_content[ $val ];
1282
+		if ( $style && isset( $style->post_content[$val] ) ) {
1283
+			return $style->post_content[$val];
1284 1284
 		}
1285 1285
 
1286 1286
 		return null;
@@ -1307,7 +1307,7 @@  discard block
 block discarded – undo
1307 1307
 			} elseif ( 'alt_bg_color' == $name ) {
1308 1308
 				$setting = 'bg_color_active';
1309 1309
 			}
1310
-			$default_styles[ $name ] = $style->post_content[ $setting ];
1310
+			$default_styles[$name] = $style->post_content[$setting];
1311 1311
 			unset( $name, $val );
1312 1312
 		}
1313 1313
 
@@ -1363,16 +1363,16 @@  discard block
 block discarded – undo
1363 1363
 		$i          = 0;
1364 1364
 		$first_open = false;
1365 1365
 
1366
-		if ( isset( $wp_meta_boxes[ $page ][ $context ] ) ) {
1366
+		if ( isset( $wp_meta_boxes[$page][$context] ) ) {
1367 1367
 			foreach ( array( 'high', 'core', 'default', 'low' ) as $priority ) {
1368
-				if ( isset( $wp_meta_boxes[ $page ][ $context ][ $priority ] ) ) {
1369
-					foreach ( $wp_meta_boxes[ $page ][ $context ][ $priority ] as $box ) {
1368
+				if ( isset( $wp_meta_boxes[$page][$context][$priority] ) ) {
1369
+					foreach ( $wp_meta_boxes[$page][$context][$priority] as $box ) {
1370 1370
 						if ( false === $box || ! $box['title'] ) {
1371 1371
 							continue;
1372 1372
 						}
1373 1373
 
1374
-						++$i;
1375
-						$icon_id = array_key_exists( $box['id'], $icon_ids ) ? $icon_ids[ $box['id'] ] : 'frm-' . $box['id'];
1374
+						++ $i;
1375
+						$icon_id = array_key_exists( $box['id'], $icon_ids ) ? $icon_ids[$box['id']] : 'frm-' . $box['id'];
1376 1376
 
1377 1377
 						$open_class = '';
1378 1378
 
Please login to merge, or discard this patch.