Completed
Push — develop ( d2057c...b6add3 )
by Aristeides
02:20
created
modules/css/field/class-kirki-output-field-multicolor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
 				$output['suffix'] = ( isset( $output['suffix'] ) ) ? $output['suffix'] : '';
57 57
 
58 58
 				// Create the styles.
59
-				$this->styles[ $output['media_query'] ][ $output['element'] ][ $output['property'] ] = $sub_value . $output['suffix'];
59
+				$this->styles[$output['media_query']][$output['element']][$output['property']] = $sub_value . $output['suffix'];
60 60
 
61 61
 			}
62 62
 		}
Please login to merge, or discard this patch.
modules/css/field/class-kirki-output-field-typography.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 			// Take care of font-families.
33 33
 			if ( isset( $value['font-family'] ) && ! empty( $value['font-family'] ) ) {
34 34
 				$output['media_query'] = ( isset( $output['media_query'] ) ) ? $output['media_query'] : 'global';
35
-				$this->styles[ $output['media_query'] ][ $output['element'] ]['font-family'] = $output['prefix'] . $this->process_property_value( 'font-family', $value['font-family'] ) . $output['suffix'];
35
+				$this->styles[$output['media_query']][$output['element']]['font-family'] = $output['prefix'] . $this->process_property_value( 'font-family', $value['font-family'] ) . $output['suffix'];
36 36
 			}
37 37
 
38 38
 			// Add support for the older font-weight parameter.
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 			// Once a user visits their customizer and make changes to their typography,
41 41
 			// new values are saved and this one is no longer used.
42 42
 			if ( isset( $value['font-weight'] ) && ! empty( $value['font-weight'] ) ) {
43
-				$this->styles[ $output['media_query'] ][ $output['element'] ]['font-weight'] = $output['prefix'] . $value['font-weight'] . $output['suffix'];
43
+				$this->styles[$output['media_query']][$output['element']]['font-weight'] = $output['prefix'] . $value['font-weight'] . $output['suffix'];
44 44
 			}
45 45
 
46 46
 			// Take care of variants.
@@ -52,44 +52,44 @@  discard block
 block discarded – undo
52 52
 
53 53
 				// Is this italic?
54 54
 				$is_italic = ( false !== strpos( $value['variant'], 'italic' ) );
55
-				$this->styles[ $output['media_query'] ][ $output['element'] ]['font-weight'] = $output['prefix'] . $font_weight . $output['suffix'];
56
-				$font_style = $is_italic ? 'italic' : 'normal' ;
57
-				$this->styles[ $output['media_query'] ][ $output['element'] ]['font-style'] = $output['prefix'] . $font_style . $output['suffix'];
55
+				$this->styles[$output['media_query']][$output['element']]['font-weight'] = $output['prefix'] . $font_weight . $output['suffix'];
56
+				$font_style = $is_italic ? 'italic' : 'normal';
57
+				$this->styles[$output['media_query']][$output['element']]['font-style'] = $output['prefix'] . $font_style . $output['suffix'];
58 58
 			}
59 59
 
60 60
 			// Take care of font-size.
61 61
 			if ( isset( $value['font-size'] ) && ! empty( $value['font-size'] ) ) {
62
-				$this->styles[ $output['media_query'] ][ $output['element'] ]['font-size'] = $output['prefix'] . $value['font-size'] . $output['suffix'];
62
+				$this->styles[$output['media_query']][$output['element']]['font-size'] = $output['prefix'] . $value['font-size'] . $output['suffix'];
63 63
 			}
64 64
 
65 65
 			// Take care of line-height.
66 66
 			if ( isset( $value['line-height'] ) && ! empty( $value['line-height'] ) ) {
67
-				$this->styles[ $output['media_query'] ][ $output['element'] ]['line-height'] = $output['prefix'] . $value['line-height'] . $output['suffix'];
67
+				$this->styles[$output['media_query']][$output['element']]['line-height'] = $output['prefix'] . $value['line-height'] . $output['suffix'];
68 68
 			}
69 69
 
70 70
 			// Take care of letter-spacing.
71 71
 			if ( isset( $value['letter-spacing'] ) && ( ! empty( $value['letter-spacing'] ) || '0' == $value['letter-spacing'] ) ) {
72
-				$this->styles[ $output['media_query'] ][ $output['element'] ]['letter-spacing'] = $output['prefix'] . $value['letter-spacing'] . $output['suffix'];
72
+				$this->styles[$output['media_query']][$output['element']]['letter-spacing'] = $output['prefix'] . $value['letter-spacing'] . $output['suffix'];
73 73
 			}
74 74
 
75 75
 			// Take care of word-spacing.
76 76
 			if ( isset( $value['word-spacing'] ) && ( ! empty( $value['word-spacing'] ) || '0' == $value['word-spacing'] ) ) {
77
-				$this->styles[ $output['media_query'] ][ $output['element'] ]['word-spacing'] = $output['prefix'] . $value['word-spacing'] . $output['suffix'];
77
+				$this->styles[$output['media_query']][$output['element']]['word-spacing'] = $output['prefix'] . $value['word-spacing'] . $output['suffix'];
78 78
 			}
79 79
 
80 80
 			// Take care of text-align.
81 81
 			if ( isset( $value['text-align'] ) && ! empty( $value['text-align'] ) ) {
82
-				$this->styles[ $output['media_query'] ][ $output['element'] ]['text-align'] = $output['prefix'] . $value['text-align'] . $output['suffix'];
82
+				$this->styles[$output['media_query']][$output['element']]['text-align'] = $output['prefix'] . $value['text-align'] . $output['suffix'];
83 83
 			}
84 84
 
85 85
 			// Take care of text-transform.
86 86
 			if ( isset( $value['text-transform'] ) && ! empty( $value['text-transform'] ) ) {
87
-				$this->styles[ $output['media_query'] ][ $output['element'] ]['text-transform'] = $output['prefix'] . $value['text-transform'] . $output['suffix'];
87
+				$this->styles[$output['media_query']][$output['element']]['text-transform'] = $output['prefix'] . $value['text-transform'] . $output['suffix'];
88 88
 			}
89 89
 
90 90
 			// Take care of color.
91 91
 			if ( isset( $value['color'] ) && ! empty( $value['color'] ) ) {
92
-				$this->styles[ $output['media_query'] ][ $output['element'] ]['color'] = $output['prefix'] . $value['color'] . $output['suffix'];
92
+				$this->styles[$output['media_query']][$output['element']]['color'] = $output['prefix'] . $value['color'] . $output['suffix'];
93 93
 			}
94 94
 		}
95 95
 	}
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
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
 					$property = $output['property'] . '-' . $key;
25 25
 				}
26 26
 				$output['media_query'] = ( isset( $output['media_query'] ) ) ? $output['media_query'] : 'global';
27
-				$this->styles[ $output['media_query'] ][ $output['element'] ][ $property ] = $sub_value;
27
+				$this->styles[$output['media_query']][$output['element']][$property] = $sub_value;
28 28
 			}
29 29
 		}
30 30
 	}
Please login to merge, or discard this patch.
modules/css/class-kirki-output.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -133,11 +133,11 @@  discard block
 block discarded – undo
133 133
 				return;
134 134
 			}
135 135
 			$output['media_query'] = ( isset( $output['media_query'] ) ) ? $output['media_query'] : 'global';
136
-			$output['prefix']      = ( isset( $output['prefix'] ) )      ? $output['prefix']      : '';
137
-			$output['units']       = ( isset( $output['units'] ) )       ? $output['units']       : '';
138
-			$output['suffix']      = ( isset( $output['suffix'] ) )      ? $output['suffix']      : '';
136
+			$output['prefix']      = ( isset( $output['prefix'] ) ) ? $output['prefix'] : '';
137
+			$output['units']       = ( isset( $output['units'] ) ) ? $output['units'] : '';
138
+			$output['suffix']      = ( isset( $output['suffix'] ) ) ? $output['suffix'] : '';
139 139
 
140
-			$this->styles[ $output['media_query'] ][ $output['element'] ][ $output['property'] ] = $output['prefix'] . $value . $output['units'] . $output['suffix'];
140
+			$this->styles[$output['media_query']][$output['element']][$output['property']] = $output['prefix'] . $value . $output['units'] . $output['suffix'];
141 141
 		}
142 142
 
143 143
 		/**
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 				'background-position' => 'Kirki_Output_Property_Background_Position',
158 158
 			) );
159 159
 			if ( array_key_exists( $property, $properties ) ) {
160
-				$classname = $properties[ $property ];
160
+				$classname = $properties[$property];
161 161
 				$obj = new $classname( $property, $value );
162 162
 				return $obj->get_value();
163 163
 			}
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
@@ -24,13 +24,13 @@
 block discarded – undo
24 24
 			// Add backup font
25 25
 			if ( Kirki_Fonts::is_google_font( $this->value ) ) {
26 26
 
27
-				if ( isset( $google_fonts_array[ $this->value ] ) && isset( $google_fonts_array[ $this->value ]['category'] ) ) {
28
-					if ( isset( $backup_fonts[ $google_fonts_array[ $this->value ]['category'] ] ) ) {
27
+				if ( isset( $google_fonts_array[$this->value] ) && isset( $google_fonts_array[$this->value]['category'] ) ) {
28
+					if ( isset( $backup_fonts[$google_fonts_array[$this->value]['category']] ) ) {
29 29
 						// Add double quotes if needed
30 30
 						if ( false !== strpos( $this->value, ' ' ) && false === strpos( $this->value, '"' ) ) {
31
-							$this->value = '"' . $this->value . '", ' . $backup_fonts[ $google_fonts_array[ $this->value ]['category'] ];
31
+							$this->value = '"' . $this->value . '", ' . $backup_fonts[$google_fonts_array[$this->value]['category']];
32 32
 						} else {
33
-							$this->value .= ', ' . $backup_fonts[ $google_fonts_array[ $this->value ]['category'] ];
33
+							$this->value .= ', ' . $backup_fonts[$google_fonts_array[$this->value]['category']];
34 34
 						}
35 35
 					}
36 36
 				}
Please login to merge, or discard this patch.
field/class-kirki-field-typography.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -160,8 +160,8 @@
 block discarded – undo
160 160
 
161 161
 			// Sanitize the font-size.
162 162
 			if ( 'font-size' === $key || 'letter-spacing' === $key || 'word-spacing' === $key ) {
163
-				$value[ $key ] = Kirki_Sanitize_Values::css_dimension( $value[ $key ] );
164
-				if ( is_numeric( $value[ $key ] ) ) {
163
+				$value[$key] = Kirki_Sanitize_Values::css_dimension( $value[$key] );
164
+				if ( is_numeric( $value[$key] ) ) {
165 165
 					$value['font-size'] .= 'px';
166 166
 				}
167 167
 			} elseif ( 'line-height' === $key ) {
Please login to merge, or discard this patch.
modules/field-dependencies/class-kirki-modules-field-dependencies.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
 				}
49 49
 			}
50 50
 			if ( $process_field && isset( $field['required'] ) && ! empty( $field['required'] ) ) {
51
-				$field_dependencies[ $field['id'] ] = $field['required'];
51
+				$field_dependencies[$field['id']] = $field['required'];
52 52
 			}
53 53
 		}
54 54
 		wp_localize_script( 'kirki_field_dependencies', 'fieldDependencies', $field_dependencies );
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
@@ -104,14 +104,14 @@  discard block
 block discarded – undo
104 104
 			$available_variants = array();
105 105
 			foreach ( $variants as $variant ) {
106 106
 				if ( array_key_exists( $variant, $all_variants ) ) {
107
-					$available_variants[] = array( 'id' => $variant, 'label' => $all_variants[ $variant ] );
107
+					$available_variants[] = array( 'id' => $variant, 'label' => $all_variants[$variant] );
108 108
 				}
109 109
 			}
110 110
 
111 111
 			$available_subsets = array();
112 112
 			foreach ( $subsets as $subset ) {
113 113
 				if ( array_key_exists( $subset, $all_subsets ) ) {
114
-					$available_subsets[] = array( 'id' => $subset, 'label' => $all_subsets[ $subset ] );
114
+					$available_subsets[] = array( 'id' => $subset, 'label' => $all_subsets[$subset] );
115 115
 				}
116 116
 			}
117 117
 
@@ -388,6 +388,6 @@  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
 }
Please login to merge, or discard this patch.
core/class-kirki-explode-background-field.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 			$key               = esc_attr( $key );
52 52
 			$setting           = $key;
53 53
 			$tooltip           = $field['tooltip'];
54
-			$description       = isset( $l10n[ 'background-' . $key ] ) ? $l10n[ 'background-' . $key ] : '';
54
+			$description       = isset( $l10n['background-' . $key] ) ? $l10n['background-' . $key] : '';
55 55
 			$output_property   = 'background-' . $key;
56 56
 			$label             = ( 0 === $i ) ? $field['label'] : '';
57 57
 			$type              = 'select';
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 			 * Build the field.
106 106
 			 * We're merging with the original field here, so any extra properties are inherited.
107 107
 			 */
108
-			$fields[ $property_setting ] = array_merge( $field, array(
108
+			$fields[$property_setting] = array_merge( $field, array(
109 109
 				'type'              => $type,
110 110
 				'label'             => $label,
111 111
 				'settings'          => $property_setting,
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
 				'description'       => $description,
117 117
 				'default'           => $value,
118 118
 				'id'                => sanitize_key( str_replace( '[', '-', str_replace( ']', '', $property_setting ) ) ),
119
-				'choices'           => isset( $choices[ $key ] ) ? $choices[ $key ] : array(),
119
+				'choices'           => isset( $choices[$key] ) ? $choices[$key] : array(),
120 120
 				'sanitize_callback' => $sanitize_callback,
121 121
 				'output'            => ( ! empty( $field['output'] ) ) ? array(
122 122
 					array(
Please login to merge, or discard this patch.