Completed
Pull Request — develop (#1517)
by Aristeides
07:18 queued 04:36
created
modules/css/property/class-kirki-output-property-font-family.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,8 +43,8 @@
 block discarded – undo
43 43
 		// Add backup font.
44 44
 		if ( Kirki_Fonts::is_google_font( $family ) ) {
45 45
 
46
-			if ( '' === $backup && isset( $google_fonts_array[ $family ] ) && isset( $backup_fonts[ $google_fonts_array[ $family ]['category'] ] ) ) {
47
-				$backup = $backup_fonts[ $google_fonts_array[ $family ]['category'] ];
46
+			if ( '' === $backup && isset( $google_fonts_array[$family] ) && isset( $backup_fonts[$google_fonts_array[$family]['category']] ) ) {
47
+				$backup = $backup_fonts[$google_fonts_array[$family]['category']];
48 48
 			}
49 49
 
50 50
 			// Add double quotes if needed.
Please login to merge, or discard this patch.
modules/css/class-kirki-modules-css-generator.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
 			'kirki-multicolor'  => 'Kirki_Output_Field_Multicolor',
173 173
 		) );
174 174
 		if ( array_key_exists( self::$field_type, $field_output_classes ) ) {
175
-			$classname = $field_output_classes[ self::$field_type ];
175
+			$classname = $field_output_classes[self::$field_type];
176 176
 		}
177 177
 		$obj = new $classname( $field['kirki_config'], self::$output, self::$value );
178 178
 		return $obj->get_styles();
@@ -247,10 +247,10 @@  discard block
 block discarded – undo
247 247
 							'transition',
248 248
 							'transition-property',
249 249
 						), true ) ) {
250
-							unset( $css[ $media_query ][ $element ][ $property ] );
251
-							$css[ $media_query ][ $element ][ '-webkit-' . $property ] = $value;
252
-							$css[ $media_query ][ $element ][ '-moz-' . $property ]    = $value;
253
-							$css[ $media_query ][ $element ][ $property ]              = $value;
250
+							unset( $css[$media_query][$element][$property] );
251
+							$css[$media_query][$element]['-webkit-' . $property] = $value;
252
+							$css[$media_query][$element]['-moz-' . $property]    = $value;
253
+							$css[$media_query][$element][$property]              = $value;
254 254
 						}
255 255
 
256 256
 						// Add -ms-* and -o-*.
@@ -260,10 +260,10 @@  discard block
 block discarded – undo
260 260
 							'transition',
261 261
 							'transition-property',
262 262
 						), true ) ) {
263
-							unset( $css[ $media_query ][ $element ][ $property ] );
264
-							$css[ $media_query ][ $element ][ '-ms-' . $property ] = $value;
265
-							$css[ $media_query ][ $element ][ '-o-' . $property ]  = $value;
266
-							$css[ $media_query ][ $element ][ $property ]          = $value;
263
+							unset( $css[$media_query][$element][$property] );
264
+							$css[$media_query][$element]['-ms-' . $property] = $value;
265
+							$css[$media_query][$element]['-o-' . $property]  = $value;
266
+							$css[$media_query][$element][$property]          = $value;
267 267
 						}
268 268
 					}
269 269
 				}
Please login to merge, or discard this patch.
l10n.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,9 +38,9 @@
 block discarded – undo
38 38
 
39 39
 			// If the theme's textdomain is loaded, assign the theme's translations
40 40
 			// to the "kirki" textdomain.
41
-			if ( isset( $l10n[ $theme_textdomain ] ) ) {
41
+			if ( isset( $l10n[$theme_textdomain] ) ) {
42 42
 				// @codingStandardsIgnoreLine
43
-				$l10n[ $domain ] = $l10n[ $theme_textdomain ];
43
+				$l10n[$domain] = $l10n[$theme_textdomain];
44 44
 			}
45 45
 
46 46
 			// Always override.  We only want the theme to handle translations.
Please login to merge, or discard this patch.
core/class-kirki-modules.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 			if ( class_exists( $module_class ) ) {
88 88
 				// Use this syntax instead of $module_class::get_instance()
89 89
 				// for PHP 5.2 compatibility.
90
-				self::$active_modules[ $key ] = call_user_func( array( $module_class, 'get_instance' ) );
90
+				self::$active_modules[$key] = call_user_func( array( $module_class, 'get_instance' ) );
91 91
 			}
92 92
 		}
93 93
 	}
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 
121 121
 		$key = array_search( $module, self::$modules, true );
122 122
 		if ( false !== $key ) {
123
-			unset( self::$modules[ $key ] );
123
+			unset( self::$modules[$key] );
124 124
 		}
125 125
 	}
126 126
 
Please login to merge, or discard this patch.
core/class-kirki-init.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
 			foreach ( Kirki::$panels as $panel_args ) {
189 189
 				// Extra checks for nested panels.
190 190
 				if ( isset( $panel_args['panel'] ) ) {
191
-					if ( isset( Kirki::$panels[ $panel_args['panel'] ] ) ) {
191
+					if ( isset( Kirki::$panels[$panel_args['panel']] ) ) {
192 192
 						// Set the type to nested.
193 193
 						$panel_args['type'] = 'kirki-nested';
194 194
 					}
@@ -210,11 +210,11 @@  discard block
 block discarded – undo
210 210
 			foreach ( Kirki::$sections as $section_args ) {
211 211
 				// Extra checks for nested sections.
212 212
 				if ( isset( $section_args['section'] ) ) {
213
-					if ( isset( Kirki::$sections[ $section_args['section'] ] ) ) {
213
+					if ( isset( Kirki::$sections[$section_args['section']] ) ) {
214 214
 						// Set the type to nested.
215 215
 						$section_args['type'] = 'kirki-nested';
216 216
 						// We need to check if the parent section is nested inside a panel.
217
-						$parent_section = Kirki::$sections[ $section_args['section'] ];
217
+						$parent_section = Kirki::$sections[$section_args['section']];
218 218
 						if ( isset( $parent_section['panel'] ) ) {
219 219
 							$section_args['panel'] = $parent_section['panel'];
220 220
 						}
Please login to merge, or discard this patch.
field/class-kirki-field-gradient.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -77,25 +77,25 @@
 block discarded – undo
77 77
 		foreach ( array( 'start', 'end' ) as $context ) {
78 78
 
79 79
 			// Make sure value is array.
80
-			if ( ! isset( $value[ $context ] ) ) {
81
-				$value[ $context ] = array();
80
+			if ( ! isset( $value[$context] ) ) {
81
+				$value[$context] = array();
82 82
 			}
83 83
 
84 84
 			// Make sure color is defined.
85
-			if ( ! isset( $value[ $context ]['color'] ) ) {
86
-				$value[ $context ]['color'] = '';
85
+			if ( ! isset( $value[$context]['color'] ) ) {
86
+				$value[$context]['color'] = '';
87 87
 			}
88 88
 			// Sanitize colors.
89
-			$color_obj = ariColor::newColor( $value[ $context ]['color'] );
90
-			$value[ $context ]['color'] = $color_obj->toCSS( $color_obj->mode );
89
+			$color_obj = ariColor::newColor( $value[$context]['color'] );
90
+			$value[$context]['color'] = $color_obj->toCSS( $color_obj->mode );
91 91
 
92 92
 			// Make sure position is defined.
93
-			if ( ! isset( $value[ $context ]['position'] ) ) {
94
-				$value[ $context ]['position'] = 0;
93
+			if ( ! isset( $value[$context]['position'] ) ) {
94
+				$value[$context]['position'] = 0;
95 95
 			};
96 96
 			// Sanitize positions.
97
-			$value[ $context ]['position'] = (int) $value[ $context ]['position'];
98
-			$value[ $context ]['position'] = max( min( $value[ $context ]['position'], 100 ), 0 );
97
+			$value[$context]['position'] = (int) $value[$context]['position'];
98
+			$value[$context]['position'] = max( min( $value[$context]['position'], 100 ), 0 );
99 99
 		}
100 100
 
101 101
 		// Make siure angle exists.
Please login to merge, or discard this patch.
field/class-kirki-field-typography.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -179,7 +179,7 @@
 block discarded – undo
179 179
 				case 'letter-spacing':
180 180
 				case 'word-spacing':
181 181
 				case 'line-height':
182
-					$value[ $key ] = Kirki_Sanitize_Values::css_dimension( $val );
182
+					$value[$key] = Kirki_Sanitize_Values::css_dimension( $val );
183 183
 					break;
184 184
 				case 'text-align':
185 185
 					if ( ! in_array( $val, array( 'inherit', 'left', 'center', 'right', 'justify' ), true ) ) {
Please login to merge, or discard this patch.
modules/css/field/class-kirki-output-field-gradient.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -38,14 +38,14 @@
 block discarded – undo
38 38
 
39 39
 		$output['media_query'] = ( isset( $output['media_query'] ) ) ? $output['media_query'] : 'global';
40 40
 
41
-		$this->styles[ $output['media_query'] ][ $output['element'] ]['background'] = $value['start']['color'];
41
+		$this->styles[$output['media_query']][$output['element']]['background'] = $value['start']['color'];
42 42
 		switch ( $value['mode'] ) {
43 43
 
44 44
 			case 'linear':
45
-				$this->styles[ $output['media_query'] ][ $output['element'] ]['background'] = 'linear-gradient(' . intval( $value['angle'] ) . 'deg, ' . $value['start']['color'] . ' ' . $value['start']['position'] . '%,' . $value['end']['color'] . ' ' . $value['end']['position'] . '%)';
45
+				$this->styles[$output['media_query']][$output['element']]['background'] = 'linear-gradient(' . intval( $value['angle'] ) . 'deg, ' . $value['start']['color'] . ' ' . $value['start']['position'] . '%,' . $value['end']['color'] . ' ' . $value['end']['position'] . '%)';
46 46
 				break;
47 47
 			case 'radial':
48
-				$this->styles[ $output['media_query'] ][ $output['element'] ]['background'] = 'radial-gradient(ellipse at center,' . $value['start']['color'] . ' ' . $value['start']['position'] . '%,' . $value['end']['color'] . ' ' . $value['end']['position'] . '%)';
48
+				$this->styles[$output['media_query']][$output['element']]['background'] = 'radial-gradient(ellipse at center,' . $value['start']['color'] . ' ' . $value['start']['position'] . '%,' . $value['end']['color'] . ' ' . $value['end']['position'] . '%)';
49 49
 				break;
50 50
 		}
51 51
 	}
Please login to merge, or discard this patch.
class-kirki-autoload.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -64,8 +64,8 @@  discard block
 block discarded – undo
64 64
 		}
65 65
 
66 66
 		// Check if we've got it cached and ready.
67
-		if ( isset( $this->cached_paths[ $class_name ] ) && file_exists( $this->cached_paths[ $class_name ] ) ) {
68
-			include_once $this->cached_paths[ $class_name ];
67
+		if ( isset( $this->cached_paths[$class_name] ) && file_exists( $this->cached_paths[$class_name] ) ) {
68
+			include_once $this->cached_paths[$class_name];
69 69
 			return;
70 70
 		}
71 71
 
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 		foreach ( $paths as $path ) {
75 75
 			$path = wp_normalize_path( $path );
76 76
 			if ( file_exists( $path ) ) {
77
-				$this->cached_paths[ $class_name ] = $path;
77
+				$this->cached_paths[$class_name] = $path;
78 78
 				include_once $path;
79 79
 				return;
80 80
 			}
@@ -134,8 +134,8 @@  discard block
 block discarded – undo
134 134
 
135 135
 		$previous_path = '';
136 136
 		for ( $i = 0; $i < $levels; $i++ ) {
137
-			$paths[] = dirname( __FILE__ ) . '/' . $previous_path . strtolower( $exploded[ $i ] ) . '/' . $filename;
138
-			$previous_path .= strtolower( $exploded[ $i ] ) . '/';
137
+			$paths[] = dirname( __FILE__ ) . '/' . $previous_path . strtolower( $exploded[$i] ) . '/' . $filename;
138
+			$previous_path .= strtolower( $exploded[$i] ) . '/';
139 139
 		}
140 140
 		return $paths;
141 141
 	}
Please login to merge, or discard this patch.