Completed
Pull Request — master (#1728)
by Aristeides
04:20 queued 02:06
created
modules/webfonts/class-kirki-fonts.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -126,12 +126,12 @@
 block discarded – undo
126 126
 
127 127
 			$google_fonts = array();
128 128
 			if ( is_array( $fonts ) ) {
129
-				foreach ( $fonts['items'] as $font ) {
130
-					$google_fonts[ $font['family'] ] = array(
131
-						'label'    => $font['family'],
132
-						'variants' => $font['variants'],
133
-						'subsets'  => $font['subsets'],
134
-						'category' => $font['category'],
129
+				foreach ( $fonts[ 'items' ] as $font ) {
130
+					$google_fonts[ $font[ 'family' ] ] = array(
131
+						'label'    => $font[ 'family' ],
132
+						'variants' => $font[ 'variants' ],
133
+						'subsets'  => $font[ 'subsets' ],
134
+						'category' => $font[ 'category' ],
135 135
 					);
136 136
 				}
137 137
 			}
Please login to merge, or discard this patch.
modules/icons/class-kirki-modules-icons.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -89,15 +89,15 @@
 block discarded – undo
89 89
 
90 90
 		// Parse sections and find ones with icons.
91 91
 		foreach ( $sections as $section ) {
92
-			if ( isset( $section['icon'] ) ) {
93
-				$this->add_icon( $section['id'], $section['icon'], 'section' );
92
+			if ( isset( $section[ 'icon' ] ) ) {
93
+				$this->add_icon( $section[ 'id' ], $section[ 'icon' ], 'section' );
94 94
 			}
95 95
 		}
96 96
 
97 97
 		// Parse panels and find ones with icons.
98 98
 		foreach ( $panels as $panel ) {
99
-			if ( isset( $panel['icon'] ) ) {
100
-				$this->add_icon( $panel['id'], $panel['icon'], 'panel' );
99
+			if ( isset( $panel[ 'icon' ] ) ) {
100
+				$this->add_icon( $panel[ 'id' ], $panel[ 'icon' ], 'panel' );
101 101
 			}
102 102
 		}
103 103
 
Please login to merge, or discard this patch.
controls/php/class-kirki-control-dashicons.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
 	public function to_json() {
36 36
 		parent::to_json();
37 37
 
38
-		$this->json['icons'] = Kirki_Helper::get_dashicons();
38
+		$this->json[ 'icons' ] = Kirki_Helper::get_dashicons();
39 39
 	}
40 40
 
41 41
 	/**
Please login to merge, or discard this patch.
controls/php/class-kirki-control-radio-image.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,10 +37,10 @@
 block discarded – undo
37 37
 
38 38
 		foreach ( $this->input_attrs as $attr => $value ) {
39 39
 			if ( 'style' !== $attr ) {
40
-				$this->json['inputAttrs'] .= $attr . '="' . esc_attr( $value ) . '" ';
40
+				$this->json[ 'inputAttrs' ] .= $attr . '="' . esc_attr( $value ) . '" ';
41 41
 				continue;
42 42
 			}
43
-			$this->json['labelStyle'] = 'style="' . esc_attr( $value ) . '" ';
43
+			$this->json[ 'labelStyle' ] = 'style="' . esc_attr( $value ) . '" ';
44 44
 		}
45 45
 
46 46
 	}
Please login to merge, or discard this patch.
controls/php/class-kirki-control-dimensions.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -39,14 +39,14 @@
 block discarded – undo
39 39
 		if ( is_array( $this->choices ) ) {
40 40
 			foreach ( $this->choices as $choice => $value ) {
41 41
 				if ( 'labels' !== $choice && true === $value ) {
42
-					$this->json['choices'][ $choice ] = true;
42
+					$this->json[ 'choices' ][ $choice ] = true;
43 43
 				}
44 44
 			}
45 45
 		}
46
-		if ( is_array( $this->json['default'] ) ) {
47
-			foreach ( $this->json['default'] as $key => $value ) {
48
-				if ( isset( $this->json['choices'][ $key ] ) && ! isset( $this->json['value'][ $key ] ) ) {
49
-					$this->json['value'][ $key ] = $value;
46
+		if ( is_array( $this->json[ 'default' ] ) ) {
47
+			foreach ( $this->json[ 'default' ] as $key => $value ) {
48
+				if ( isset( $this->json[ 'choices' ][ $key ] ) && ! isset( $this->json[ 'value' ][ $key ] ) ) {
49
+					$this->json[ 'value' ][ $key ] = $value;
50 50
 				}
51 51
 			}
52 52
 		}
Please login to merge, or discard this patch.
controls/php/class-kirki-control-multicolor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
 	public function to_json() {
44 44
 		parent::to_json();
45 45
 
46
-		$this->json['alpha'] = (bool) $this->alpha;
46
+		$this->json[ 'alpha' ] = (bool) $this->alpha;
47 47
 	}
48 48
 
49 49
 	/**
Please login to merge, or discard this patch.
controls/php/class-kirki-control-slider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
 	public function to_json() {
38 38
 		parent::to_json();
39 39
 
40
-		$this->json['choices'] = wp_parse_args( $this->json['choices'], array(
40
+		$this->json[ 'choices' ] = wp_parse_args( $this->json[ 'choices' ], array(
41 41
 			'min'    => '0',
42 42
 			'max'    => '100',
43 43
 			'step'   => '1',
Please login to merge, or discard this patch.
controls/php/class-kirki-control-color-palette.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -38,11 +38,11 @@
 block discarded – undo
38 38
 		parent::to_json();
39 39
 
40 40
 		// If no palette has been defined, use Material Design Palette.
41
-		if ( ! isset( $this->json['choices']['colors'] ) || empty( $this->json['choices']['colors'] ) ) {
42
-			$this->json['choices']['colors'] = Kirki_Helper::get_material_design_colors( 'primary' );
41
+		if ( ! isset( $this->json[ 'choices' ][ 'colors' ] ) || empty( $this->json[ 'choices' ][ 'colors' ] ) ) {
42
+			$this->json[ 'choices' ][ 'colors' ] = Kirki_Helper::get_material_design_colors( 'primary' );
43 43
 		}
44
-		if ( ! isset( $this->json['choices']['size'] ) || empty( $this->json['choices']['size'] ) ) {
45
-			$this->json['choices']['size'] = 20;
44
+		if ( ! isset( $this->json[ 'choices' ][ 'size' ] ) || empty( $this->json[ 'choices' ][ 'size' ] ) ) {
45
+			$this->json[ 'choices' ][ 'size' ] = 20;
46 46
 		}
47 47
 	}
48 48
 
Please login to merge, or discard this patch.
field/class-kirki-field-url.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,8 +24,8 @@
 block discarded – undo
24 24
 		if ( ! is_array( $this->choices ) ) {
25 25
 			$this->choices = array();
26 26
 		}
27
-		$this->choices['element'] = 'input';
28
-		$this->choices['type']    = 'text';
27
+		$this->choices[ 'element' ] = 'input';
28
+		$this->choices[ 'type' ]    = 'text';
29 29
 
30 30
 	}
31 31
 
Please login to merge, or discard this patch.