Completed
Branch develop (1becb4)
by Aristeides
05:50 queued 02:46
created
includes/settings/class-kirki-settings-repeater-setting.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,9 +50,9 @@
 block discarded – undo
50 50
 			// Make sure that every row is an array, not an object
51 51
 			foreach ( $sanitized as $key => $_value ) {
52 52
 				if ( empty( $_value ) ) {
53
-					unset( $sanitized[ $key ] );
53
+					unset( $sanitized[$key] );
54 54
 				} else {
55
-					$sanitized[ $key ] = (array) $_value;
55
+					$sanitized[$key] = (array) $_value;
56 56
 				}
57 57
 			}
58 58
 
Please login to merge, or discard this patch.
includes/class-kirki-active-callback.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,11 +15,11 @@
 block discarded – undo
15 15
 			$fields = Kirki::$fields;
16 16
 
17 17
 			// Make sure the current object matches a registered field.
18
-			if ( ! isset( $object->setting->id ) || ! isset( $fields[ $object->setting->id ] ) ) {
18
+			if ( ! isset( $object->setting->id ) || ! isset( $fields[$object->setting->id] ) ) {
19 19
 				return true;
20 20
 			}
21 21
 
22
-			$current_object = $fields[ $object->setting->id ];
22
+			$current_object = $fields[$object->setting->id];
23 23
 
24 24
 			if ( isset( $current_object['required'] ) ) {
25 25
 
Please login to merge, or discard this patch.
includes/class-kirki-init.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -172,9 +172,9 @@
 block discarded – undo
172 172
 							 * If no callback is defined (false) then just get the value.
173 173
 							 */
174 174
 							if ( $variable_callback ) {
175
-								$variables[ $variable_name ] = call_user_func( $field_variable['callback'], Kirki::get_option( $field['settings'] ) );
175
+								$variables[$variable_name] = call_user_func( $field_variable['callback'], Kirki::get_option( $field['settings'] ) );
176 176
 							} else {
177
-								$variables[ $variable_name ] = Kirki::get_option( $field['settings'] );
177
+								$variables[$variable_name] = Kirki::get_option( $field['settings'] );
178 178
 							}
179 179
 
180 180
 						}
Please login to merge, or discard this patch.
autoloader.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,8 +21,8 @@
 block discarded – undo
21 21
 
22 22
 			$previous_path = '';
23 23
 			for ( $i = 0; $i < $levels; $i++ ) {
24
-				$paths[] = $path . $previous_path . strtolower( $exploded[ $i ] ) . '/' . $filename;
25
-				$previous_path .= strtolower( $exploded[ $i ] ) . '/';
24
+				$paths[] = $path . $previous_path . strtolower( $exploded[$i] ) . '/' . $filename;
25
+				$previous_path .= strtolower( $exploded[$i] ) . '/';
26 26
 			}
27 27
 
28 28
 			foreach ( $paths as $path ) {
Please login to merge, or discard this patch.
includes/controls/class-kirki-controls-repeater-control.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -34,13 +34,13 @@  discard block
 block discarded – undo
34 34
 
35 35
 			foreach ( $args['fields'] as $key => $value ) {
36 36
 				if ( ! isset( $value['default'] ) ) {
37
-					$args['fields'][ $key ]['default'] = '';
37
+					$args['fields'][$key]['default'] = '';
38 38
 				}
39 39
 
40 40
 				if ( ! isset( $value['label'] ) ) {
41
-					$args['fields'][ $key ]['label'] = '';
41
+					$args['fields'][$key]['label'] = '';
42 42
 				}
43
-				$args['fields'][ $key ]['id'] = $key;
43
+				$args['fields'][$key]['id'] = $key;
44 44
 			}
45 45
 
46 46
 			$this->fields = $args['fields'];
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 					continue;
64 64
 				}
65 65
 
66
-				$fields[ $key ]['buttonLabels'] = $default_image_button_labels;
66
+				$fields[$key]['buttonLabels'] = $default_image_button_labels;
67 67
 			}
68 68
 
69 69
 			$this->json['fields'] = $fields;
Please login to merge, or discard this patch.
includes/controls/class-kirki-controls-spacing-control.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,15 +26,15 @@
 block discarded – undo
26 26
 			if ( is_array( $this->choices ) ) {
27 27
 				foreach ( $this->choices as $choice => $value ) {
28 28
 					if ( true === $value ) {
29
-						$this->json['choices'][ $choice ] = true;
29
+						$this->json['choices'][$choice] = true;
30 30
 					}
31 31
 				}
32 32
 			}
33 33
 
34 34
 			if ( is_array( $this->json['default'] ) ) {
35 35
 				foreach ( $this->json['default'] as $key => $value ) {
36
-					if ( isset( $this->json['choices'][ $key ] ) && ! isset( $this->json['value'][ $key ] ) ) {
37
-						$this->json['value'][ $key ] = $value;
36
+					if ( isset( $this->json['choices'][$key] ) && ! isset( $this->json['value'][$key] ) ) {
37
+						$this->json['value'][$key] = $value;
38 38
 					}
39 39
 				}
40 40
 			}
Please login to merge, or discard this patch.
includes/class-kirki-sanitize-values.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -189,7 +189,7 @@
 block discarded – undo
189 189
 				return 'auto';
190 190
 			}
191 191
 			// Return empty if there are no numbers in the value.
192
-			if ( ! preg_match( '#[0-9]#' , $value ) ) {
192
+			if ( ! preg_match( '#[0-9]#', $value ) ) {
193 193
 				return '';
194 194
 			}
195 195
 			// The raw value without the units
Please login to merge, or discard this patch.
includes/class-kirki-enqueue.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -113,14 +113,14 @@
 block discarded – undo
113 113
 				$available_variants = array();
114 114
 				foreach ( $variants as $variant ) {
115 115
 					if ( array_key_exists( $variant, $all_variants ) ) {
116
-						$available_variants[] = array( 'id' => $variant, 'label' => $all_variants[ $variant ] );
116
+						$available_variants[] = array( 'id' => $variant, 'label' => $all_variants[$variant] );
117 117
 					}
118 118
 				}
119 119
 
120 120
 				$available_subsets = array();
121 121
 				foreach ( $subsets as $subset ) {
122 122
 					if ( array_key_exists( $subset, $all_subsets ) ) {
123
-						$available_subsets[] = array( 'id' => $subset, 'label' => $all_subsets[ $subset ] );
123
+						$available_subsets[] = array( 'id' => $subset, 'label' => $all_subsets[$subset] );
124 124
 					}
125 125
 				}
126 126
 
Please login to merge, or discard this patch.
includes/class-kirki-helper.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -27,8 +27,8 @@  discard block
 block discarded – undo
27 27
 			}
28 28
 			$count = count( $args );
29 29
 			for ( $i = 1; $i < $count; $i++ ) {
30
-				if ( is_array( $args[ $i ] ) ) {
31
-					$array = self::recurse( $array, $args[ $i ] );
30
+				if ( is_array( $args[$i] ) ) {
31
+					$array = self::recurse( $array, $args[$i] );
32 32
 				}
33 33
 			}
34 34
 			return $array;
@@ -37,15 +37,15 @@  discard block
 block discarded – undo
37 37
 		public static function recurse( $array, $array1 ) {
38 38
 			foreach ( $array1 as $key => $value ) {
39 39
 				// create new key in $array, if it is empty or not an array
40
-				if ( ! isset( $array[ $key ] ) || ( isset( $array[ $key ] ) && ! is_array( $array[ $key ] ) ) ) {
41
-					$array[ $key ] = array();
40
+				if ( ! isset( $array[$key] ) || ( isset( $array[$key] ) && ! is_array( $array[$key] ) ) ) {
41
+					$array[$key] = array();
42 42
 				}
43 43
 
44 44
 				// overwrite the value in the base array
45 45
 				if ( is_array( $value ) ) {
46
-					$value = self::recurse( $array[ $key ], $value );
46
+					$value = self::recurse( $array[$key], $value );
47 47
 				}
48
-				$array[ $key ] = $value;
48
+				$array[$key] = $value;
49 49
 			}
50 50
 			return $array;
51 51
 		}
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 			// properly format the array.
103 103
 			$items = array();
104 104
 			foreach ( $posts as $post ) {
105
-				$items[ $post->ID ] = $post->post_title;
105
+				$items[$post->ID] = $post->post_title;
106 106
 			}
107 107
 
108 108
 			return $items;
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 			foreach ( $taxonomies as $taxonomy ) {
120 120
 				$id           = $taxonomy;
121 121
 				$taxonomy     = get_taxonomy( $taxonomy );
122
-				$items[ $id ] = $taxonomy->labels->name;
122
+				$items[$id] = $taxonomy->labels->name;
123 123
 			}
124 124
 
125 125
 			return $items;
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 			$post_types = get_post_types( array( 'public' => true ), 'objects' );
135 135
 			// Build the array
136 136
 			foreach ( $post_types as $post_type ) {
137
-				$items[ $post_type->name ] = $post_type->labels->name;
137
+				$items[$post_type->name] = $post_type->labels->name;
138 138
 			}
139 139
 
140 140
 			return $items;
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 			$terms = get_terms( $taxonomies );
150 150
 			// Build the array
151 151
 			foreach ( $terms as $term ) {
152
-				$items[ $term->term_id ] = $term->name;
152
+				$items[$term->term_id] = $term->name;
153 153
 			}
154 154
 
155 155
 			return $items;
Please login to merge, or discard this patch.