Test Setup Failed
Push — master ( 3e6d69...55e7e9 )
by Aristeides
02:27
created
core/class-kirki-sections.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,8 +36,8 @@
 block discarded – undo
36 36
 		$css = '';
37 37
 		if ( ! empty( Kirki::$sections ) ) {
38 38
 			foreach ( Kirki::$sections as $section_args ) {
39
-				if ( isset( $section_args['id'] ) && isset( $section_args['type'] ) && 'outer' === $section_args['type'] || 'kirki-outer' === $section_args['type'] ) {
40
-					$css .= '#customize-theme-controls li#accordion-section-' . $section_args['id'] . '{display:list-item!important;}';
39
+				if ( isset( $section_args[ 'id' ] ) && isset( $section_args[ 'type' ] ) && 'outer' === $section_args[ 'type' ] || 'kirki-outer' === $section_args[ 'type' ] ) {
40
+					$css .= '#customize-theme-controls li#accordion-section-' . $section_args[ 'id' ] . '{display:list-item!important;}';
41 41
 				}
42 42
 			}
43 43
 		}
Please login to merge, or discard this patch.
core/class-kirki-init.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -58,8 +58,8 @@  discard block
 block discarded – undo
58 58
 
59 59
 		// Apply the kirki/config filter.
60 60
 		$config = apply_filters( 'kirki/config', array() );
61
-		if ( isset( $config['url_path'] ) ) {
62
-			Kirki::$url = $config['url_path'];
61
+		if ( isset( $config[ 'url_path' ] ) ) {
62
+			Kirki::$url = $config[ 'url_path' ];
63 63
 		}
64 64
 
65 65
 		// Make sure the right protocol is used.
@@ -167,10 +167,10 @@  discard block
 block discarded – undo
167 167
 		if ( ! empty( Kirki::$panels ) ) {
168 168
 			foreach ( Kirki::$panels as $panel_args ) {
169 169
 				// Extra checks for nested panels.
170
-				if ( isset( $panel_args['panel'] ) ) {
171
-					if ( isset( Kirki::$panels[ $panel_args['panel'] ] ) ) {
170
+				if ( isset( $panel_args[ 'panel' ] ) ) {
171
+					if ( isset( Kirki::$panels[ $panel_args[ 'panel' ] ] ) ) {
172 172
 						// Set the type to nested.
173
-						$panel_args['type'] = 'kirki-nested';
173
+						$panel_args[ 'type' ] = 'kirki-nested';
174 174
 					}
175 175
 				}
176 176
 
@@ -188,14 +188,14 @@  discard block
 block discarded – undo
188 188
 		if ( ! empty( Kirki::$sections ) ) {
189 189
 			foreach ( Kirki::$sections as $section_args ) {
190 190
 				// Extra checks for nested sections.
191
-				if ( isset( $section_args['section'] ) ) {
192
-					if ( isset( Kirki::$sections[ $section_args['section'] ] ) ) {
191
+				if ( isset( $section_args[ 'section' ] ) ) {
192
+					if ( isset( Kirki::$sections[ $section_args[ 'section' ] ] ) ) {
193 193
 						// Set the type to nested.
194
-						$section_args['type'] = 'kirki-nested';
194
+						$section_args[ 'type' ] = 'kirki-nested';
195 195
 						// We need to check if the parent section is nested inside a panel.
196
-						$parent_section = Kirki::$sections[ $section_args['section'] ];
197
-						if ( isset( $parent_section['panel'] ) ) {
198
-							$section_args['panel'] = $parent_section['panel'];
196
+						$parent_section = Kirki::$sections[ $section_args[ 'section' ] ];
197
+						if ( isset( $parent_section[ 'panel' ] ) ) {
198
+							$section_args[ 'panel' ] = $parent_section[ 'panel' ];
199 199
 						}
200 200
 					}
201 201
 				}
Please login to merge, or discard this patch.
modules/custom-sections/panels/class-kirki-panels-nested-panel.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -49,10 +49,10 @@
 block discarded – undo
49 49
 			'panel',
50 50
 		) );
51 51
 
52
-		$array['title']          = html_entity_decode( $this->title, ENT_QUOTES, get_bloginfo( 'charset' ) );
53
-		$array['content']        = $this->get_content();
54
-		$array['active']         = $this->active();
55
-		$array['instanceNumber'] = $this->instance_number;
52
+		$array[ 'title' ]          = html_entity_decode( $this->title, ENT_QUOTES, get_bloginfo( 'charset' ) );
53
+		$array[ 'content' ]        = $this->get_content();
54
+		$array[ 'active' ]         = $this->active();
55
+		$array[ 'instanceNumber' ] = $this->instance_number;
56 56
 
57 57
 		return $array;
58 58
 	}
Please login to merge, or discard this patch.
modules/custom-sections/sections/class-kirki-sections-nested-section.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -51,15 +51,15 @@
 block discarded – undo
51 51
 			'section',
52 52
 		) );
53 53
 
54
-		$array['title']          = html_entity_decode( $this->title, ENT_QUOTES, get_bloginfo( 'charset' ) );
55
-		$array['content']        = $this->get_content();
56
-		$array['active']         = $this->active();
57
-		$array['instanceNumber'] = $this->instance_number;
54
+		$array[ 'title' ]          = html_entity_decode( $this->title, ENT_QUOTES, get_bloginfo( 'charset' ) );
55
+		$array[ 'content' ]        = $this->get_content();
56
+		$array[ 'active' ]         = $this->active();
57
+		$array[ 'instanceNumber' ] = $this->instance_number;
58 58
 
59
-		$array['customizeAction'] = esc_attr__( 'Customizing', 'kirki' );
59
+		$array[ 'customizeAction' ] = esc_attr__( 'Customizing', 'kirki' );
60 60
 		if ( $this->panel ) {
61 61
 			/* translators: The title. */
62
-			$array['customizeAction'] = sprintf( esc_attr__( 'Customizing ▸ %s', 'kirki' ), esc_html( $this->manager->get_panel( $this->panel )->title ) );
62
+			$array[ 'customizeAction' ] = sprintf( esc_attr__( 'Customizing ▸ %s', 'kirki' ), esc_html( $this->manager->get_panel( $this->panel )->title ) );
63 63
 		}
64 64
 		return $array;
65 65
 	}
Please login to merge, or discard this patch.
modules/selective-refresh/class-kirki-modules-selective-refresh.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -69,13 +69,13 @@
 block discarded – undo
69 69
 
70 70
 		// Start parsing the fields.
71 71
 		foreach ( $fields as $field ) {
72
-			if ( isset( $field['partial_refresh'] ) && ! empty( $field['partial_refresh'] ) ) {
72
+			if ( isset( $field[ 'partial_refresh' ] ) && ! empty( $field[ 'partial_refresh' ] ) ) {
73 73
 				// Start going through each item in the array of partial refreshes.
74
-				foreach ( $field['partial_refresh'] as $partial_refresh => $partial_refresh_args ) {
74
+				foreach ( $field[ 'partial_refresh' ] as $partial_refresh => $partial_refresh_args ) {
75 75
 					// If we have all we need, create the selective refresh call.
76
-					if ( isset( $partial_refresh_args['render_callback'] ) && isset( $partial_refresh_args['selector'] ) ) {
76
+					if ( isset( $partial_refresh_args[ 'render_callback' ] ) && isset( $partial_refresh_args[ 'selector' ] ) ) {
77 77
 						$partial_refresh_args = wp_parse_args( $partial_refresh_args, array(
78
-							'settings' => $field['settings'],
78
+							'settings' => $field[ 'settings' ],
79 79
 						) );
80 80
 						$wp_customize->selective_refresh->add_partial( $partial_refresh, $partial_refresh_args );
81 81
 					}
Please login to merge, or discard this patch.
modules/customizer-styling/class-kirki-modules-customizer-styling.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -68,10 +68,10 @@  discard block
 block discarded – undo
68 68
 	public function custom_css() {
69 69
 
70 70
 		$config = apply_filters( 'kirki/config', array() );
71
-		if ( ! isset( $config['color_accent'] ) && ! isset( $config['color_back'] ) ) {
71
+		if ( ! isset( $config[ 'color_accent' ] ) && ! isset( $config[ 'color_back' ] ) ) {
72 72
 			return;
73 73
 		}
74
-		$back     = isset( $config['color_back'] ) ? $config['color_back'] : false;
74
+		$back = isset( $config[ 'color_back' ] ) ? $config[ 'color_back' ] : false;
75 75
 
76 76
 		$text_on_back              = '';
77 77
 		$border_on_back            = '';
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 			$hover_on_back  = ( 90 < $back_obj->lightness ) ? $back_obj->getNew( 'lightness', $back_obj->lightness - 3 )->toCSS( $back_obj->mode ) : $back_obj->getNew( 'lightness', $back_obj->lightness + 3 )->toCSS( $back_obj->mode );
94 94
 			$arrows_on_back = ( 50 > $back_obj->lightness ) ? $back_obj->getNew( 'lightness', $back_obj->lightness + 30 )->toCSS( $back_obj->mode ) : $back_obj->getNew( 'lightness', $back_obj->lightness - 30 )->toCSS( $back_obj->mode );
95 95
 		}
96
-		$accent     = ( isset( $config['color_accent'] ) ) ? $config['color_accent'] : false;
96
+		$accent = ( isset( $config[ 'color_accent' ] ) ) ? $config[ 'color_accent' ] : false;
97 97
 		if ( $accent ) {
98 98
 			$accent_obj                = ariColor::newColor( $accent );
99 99
 			$text_on_accent            = ( 60 > $accent_obj->lightness ) ? $accent_obj->getNew( 'lightness', $accent_obj->lightness + 60 )->toCSS( $accent_obj->mode ) : $accent_obj->getNew( 'lightness', $accent_obj->lightness - 60 )->toCSS( $accent_obj->mode );
@@ -405,18 +405,18 @@  discard block
 block discarded – undo
405 405
 			color: #444 !important;
406 406
 		}
407 407
 
408
-		<?php if ( isset( $config['width'] ) ) : ?>
408
+		<?php if ( isset( $config[ 'width' ] ) ) : ?>
409 409
 			.wp-full-overlay-sidebar {
410
-				width: <?php echo esc_attr( $config['width'] ); // WPCS: XSS ok. ?>;
410
+				width: <?php echo esc_attr( $config[ 'width' ] ); // WPCS: XSS ok. ?>;
411 411
 			}
412 412
 			.expanded .wp-full-overlay-footer {
413
-				width: <?php echo esc_attr( $config['width'] ); // WPCS: XSS ok. ?>;
413
+				width: <?php echo esc_attr( $config[ 'width' ] ); // WPCS: XSS ok. ?>;
414 414
 			}
415 415
 			.wp-full-overlay.expanded {
416
-				margin-left: <?php echo esc_attr( $config['width'] ); // WPCS: XSS ok. ?>;
416
+				margin-left: <?php echo esc_attr( $config[ 'width' ] ); // WPCS: XSS ok. ?>;
417 417
 			}
418 418
 			.wp-full-overlay.collapsed .wp-full-overlay-sidebar {
419
-				margin-left: -<?php echo esc_attr( $config['width'] ); // WPCS: XSS ok. ?>;
419
+				margin-left: -<?php echo esc_attr( $config[ 'width' ] ); // WPCS: XSS ok. ?>;
420 420
 			}
421 421
 		<?php endif; ?>
422 422
 		</style>
Please login to merge, or discard this patch.
modules/customizer-branding/class-kirki-modules-customizer-branding.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -73,14 +73,14 @@
 block discarded – undo
73 73
 			'logoImage'   => '',
74 74
 			'description' => '',
75 75
 		);
76
-		if ( isset( $config['logo_image'] ) && '' !== $config['logo_image'] ) {
77
-			$vars['logoImage'] = esc_url_raw( $config['logo_image'] );
76
+		if ( isset( $config[ 'logo_image' ] ) && '' !== $config[ 'logo_image' ] ) {
77
+			$vars[ 'logoImage' ] = esc_url_raw( $config[ 'logo_image' ] );
78 78
 		}
79
-		if ( isset( $config['description'] ) && '' !== $config['description'] ) {
80
-			$vars['description'] = esc_textarea( $config['description'] );
79
+		if ( isset( $config[ 'description' ] ) && '' !== $config[ 'description' ] ) {
80
+			$vars[ 'description' ] = esc_textarea( $config[ 'description' ] );
81 81
 		}
82 82
 
83
-		if ( ! empty( $vars['logoImage'] ) || ! empty( $vars['description'] ) ) {
83
+		if ( ! empty( $vars[ 'logoImage' ] ) || ! empty( $vars[ 'description' ] ) ) {
84 84
 			wp_register_script( 'kirki-branding', Kirki::$url . '/modules/customizer-branding/branding.js', array(), KIRKI_VERSION );
85 85
 			wp_localize_script( 'kirki-branding', 'kirkiBranding', $vars );
86 86
 			wp_enqueue_script( 'kirki-branding' );
Please login to merge, or discard this patch.
modules/css/property/class-kirki-output-property-font-family.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -26,9 +26,9 @@  discard block
 block discarded – undo
26 26
 
27 27
 		$family = $this->value;
28 28
 		$backup = '';
29
-		if ( is_array( $this->value ) && isset( $this->value[0] ) && isset( $this->value[1] ) ) {
30
-			$family = $this->value[0];
31
-			$backup = $this->value[1];
29
+		if ( is_array( $this->value ) && isset( $this->value[ 0 ] ) && isset( $this->value[ 1 ] ) ) {
30
+			$family = $this->value[ 0 ];
31
+			$backup = $this->value[ 1 ];
32 32
 		}
33 33
 
34 34
 		// Make sure the value is a string.
@@ -43,8 +43,8 @@  discard block
 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/property/class-kirki-output-property-background-position.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,8 +42,8 @@
 block discarded – undo
42 42
 		if ( false !== strpos( $this->value, ' ' ) ) {
43 43
 			$xy = explode( ' ', $this->value );
44 44
 
45
-			$x = trim( $xy[0] );
46
-			$y = trim( $xy[1] );
45
+			$x = trim( $xy[ 0 ] );
46
+			$y = trim( $xy[ 1 ] );
47 47
 
48 48
 			// If x is not left/center/right, we need to sanitize it.
49 49
 			if ( ! in_array( $x, $x_dimensions, true ) ) {
Please login to merge, or discard this patch.