Completed
Push — develop ( 5297b1...c44c9b )
by Aristeides
02:34
created
controls/repeater/class-kirki-control-repeater.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -111,12 +111,12 @@  discard block
 block discarded – undo
111 111
 
112 112
 		foreach ( $args['fields'] as $key => $value ) {
113 113
 			if ( ! isset( $value['default'] ) ) {
114
-				$args['fields'][ $key ]['default'] = '';
114
+				$args['fields'][$key]['default'] = '';
115 115
 			}
116 116
 			if ( ! isset( $value['label'] ) ) {
117
-				$args['fields'][ $key ]['label'] = '';
117
+				$args['fields'][$key]['label'] = '';
118 118
 			}
119
-			$args['fields'][ $key ]['id']      = $key;
119
+			$args['fields'][$key]['id'] = $key;
120 120
 
121 121
 			// We check if the filed is an uploaded media ( image , file, video, etc.. ).
122 122
 			if ( isset( $value['type'] ) ) {
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 					case 'cropped_image':
126 126
 					case 'upload':
127 127
 						// We add it to the list of fields that need some extra filtering/processing.
128
-						$media_fields_to_filter[ $key ] = true;
128
+						$media_fields_to_filter[$key] = true;
129 129
 						break;
130 130
 
131 131
 					case 'dropdown-pages':
@@ -140,8 +140,8 @@  discard block
 block discarded – undo
140 140
 							)
141 141
 						);
142 142
 						// Hackily add in the data link parameter.
143
-						$dropdown = str_replace( '<select', '<select data-field="' . esc_attr( $args['fields'][ $key ]['id'] ) . '"' . $this->get_link(), $dropdown );
144
-						$args['fields'][ $key ]['dropdown'] = $dropdown;
143
+						$dropdown = str_replace( '<select', '<select data-field="' . esc_attr( $args['fields'][$key]['id'] ) . '"' . $this->get_link(), $dropdown );
144
+						$args['fields'][$key]['dropdown'] = $dropdown;
145 145
 						break;
146 146
 				}
147 147
 			}
@@ -555,7 +555,7 @@  discard block
 block discarded – undo
555 555
 			}
556 556
 
557 557
 			// Validating row label field.
558
-			if ( isset( $args['row_label']['field'] ) && ! empty( $args['row_label']['field'] ) && isset( $args['fields'][ esc_attr( $args['row_label']['field'] ) ] ) ) {
558
+			if ( isset( $args['row_label']['field'] ) && ! empty( $args['row_label']['field'] ) && isset( $args['fields'][esc_attr( $args['row_label']['field'] )] ) ) {
559 559
 				$this->row_label['field'] = esc_attr( $args['row_label']['field'] );
560 560
 			} else {
561 561
 				// If from field is not set correctly, making sure standard is set as the type.
@@ -591,6 +591,6 @@  discard block
 block discarded – undo
591 591
 		if ( false === $id ) {
592 592
 			return $translation_strings;
593 593
 		}
594
-		return $translation_strings[ $id ];
594
+		return $translation_strings[$id];
595 595
 	}
596 596
 }
Please login to merge, or discard this patch.
modules/css/field/class-kirki-output-field-dimensions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
 					$property = $output['property'] . '-' . $key;
36 36
 				}
37 37
 				$output['media_query'] = ( isset( $output['media_query'] ) ) ? $output['media_query'] : 'global';
38
-				$this->styles[ $output['media_query'] ][ $output['element'] ][ $property ] = $sub_value;
38
+				$this->styles[$output['media_query']][$output['element']][$property] = $sub_value;
39 39
 
40 40
 			}
41 41
 		}
Please login to merge, or discard this patch.
modules/css/property/class-kirki-output-property-font-family.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -38,14 +38,14 @@
 block discarded – undo
38 38
 			// Add backup font.
39 39
 			if ( Kirki_Fonts::is_google_font( $this->value ) ) {
40 40
 
41
-				if ( isset( $google_fonts_array[ $this->value ] ) && isset( $google_fonts_array[ $this->value ]['category'] ) ) {
42
-					if ( isset( $backup_fonts[ $google_fonts_array[ $this->value ]['category'] ] ) ) {
41
+				if ( isset( $google_fonts_array[$this->value] ) && isset( $google_fonts_array[$this->value]['category'] ) ) {
42
+					if ( isset( $backup_fonts[$google_fonts_array[$this->value]['category']] ) ) {
43 43
 
44 44
 						// Add double quotes if needed.
45 45
 						if ( false !== strpos( $this->value, ' ' ) && false === strpos( $this->value, '"' ) ) {
46
-							$this->value = '"' . $this->value . '", ' . $backup_fonts[ $google_fonts_array[ $this->value ]['category'] ];
46
+							$this->value = '"' . $this->value . '", ' . $backup_fonts[$google_fonts_array[$this->value]['category']];
47 47
 						} else {
48
-							$this->value .= ', ' . $backup_fonts[ $google_fonts_array[ $this->value ]['category'] ];
48
+							$this->value .= ', ' . $backup_fonts[$google_fonts_array[$this->value]['category']];
49 49
 						}
50 50
 					}
51 51
 				}
Please login to merge, or discard this patch.
controls/typography/class-kirki-control-typography.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -105,14 +105,14 @@  discard block
 block discarded – undo
105 105
 			$available_variants = array();
106 106
 			foreach ( $variants as $variant ) {
107 107
 				if ( array_key_exists( $variant, $all_variants ) ) {
108
-					$available_variants[] = array( 'id' => $variant, 'label' => $all_variants[ $variant ] );
108
+					$available_variants[] = array( 'id' => $variant, 'label' => $all_variants[$variant] );
109 109
 				}
110 110
 			}
111 111
 
112 112
 			$available_subsets = array();
113 113
 			foreach ( $subsets as $subset ) {
114 114
 				if ( array_key_exists( $subset, $all_subsets ) ) {
115
-					$available_subsets[] = array( 'id' => $subset, 'label' => $all_subsets[ $subset ] );
115
+					$available_subsets[] = array( 'id' => $subset, 'label' => $all_subsets[$subset] );
116 116
 				}
117 117
 			}
118 118
 
@@ -388,7 +388,7 @@  discard block
 block discarded – undo
388 388
 		if ( false === $id ) {
389 389
 			return $translation_strings;
390 390
 		}
391
-		return $translation_strings[ $id ];
391
+		return $translation_strings[$id];
392 392
 	}
393 393
 
394 394
 	/**
Please login to merge, or discard this patch.
field/class-kirki-field-spacing.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
 
53 53
 		// Sanitize each sub-value separately.
54 54
 		foreach ( $value as $key => $sub_value ) {
55
-			$value[ $key ] = Kirki_Sanitize_Values::css_dimension( $sub_value );
55
+			$value[$key] = Kirki_Sanitize_Values::css_dimension( $sub_value );
56 56
 		}
57 57
 		return $value;
58 58
 
Please login to merge, or discard this patch.
core/class-kirki-section.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
 		$section_classname = 'WP_Customize_Section';
51 51
 
52 52
 		if ( isset( $args['type'] ) && array_key_exists( $args['type'], $this->section_types ) ) {
53
-			$section_classname = $this->section_types[ $args['type'] ];
53
+			$section_classname = $this->section_types[$args['type']];
54 54
 		}
55 55
 
56 56
 		// Add the section.
Please login to merge, or discard this patch.
core/class-kirki-panel.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
 		if ( ! isset( $args['type'] ) || ! array_key_exists( $args['type'], $this->panel_types ) ) {
50 50
 			$args['type'] = 'default';
51 51
 		}
52
-		$panel_classname = $this->panel_types[ $args['type'] ];
52
+		$panel_classname = $this->panel_types[$args['type']];
53 53
 
54 54
 		$wp_customize->add_panel( new $panel_classname( $wp_customize, sanitize_key( $args['id'] ), $args ) );
55 55
 
Please login to merge, or discard this patch.
settings/class-kirki-settings-repeater-setting.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -70,9 +70,9 @@
 block discarded – undo
70 70
 			// Make sure that every row is an array, not an object.
71 71
 			foreach ( $sanitized as $key => $_value ) {
72 72
 				if ( empty( $_value ) ) {
73
-					unset( $sanitized[ $key ] );
73
+					unset( $sanitized[$key] );
74 74
 				} else {
75
-					$sanitized[ $key ] = (array) $_value;
75
+					$sanitized[$key] = (array) $_value;
76 76
 				}
77 77
 			}
78 78
 
Please login to merge, or discard this patch.
field/class-kirki-field-sortable.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
 		}
53 53
 		$sanitized_value = array();
54 54
 		foreach ( $value as $sub_value ) {
55
-			if ( isset( $this->choices[ $sub_value ] ) ) {
55
+			if ( isset( $this->choices[$sub_value] ) ) {
56 56
 				$sanitized_value[] = esc_attr( $sub_value );
57 57
 			}
58 58
 		}
Please login to merge, or discard this patch.