Completed
Branch develop (540b6d)
by Aristeides
02:27
created
autoloader.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,8 +40,8 @@
 block discarded – undo
40 40
 
41 41
 			$previous_path = '';
42 42
 			for ( $i = 0; $i < $levels; $i++ ) {
43
-				$paths[] = dirname( __FILE__ ) . '/' . $previous_path . strtolower( $exploded[ $i ] ) . '/' . $filename;
44
-				$previous_path .= strtolower( $exploded[ $i ] ) . '/';
43
+				$paths[] = dirname( __FILE__ ) . '/' . $previous_path . strtolower( $exploded[$i] ) . '/' . $filename;
44
+				$previous_path .= strtolower( $exploded[$i] ) . '/';
45 45
 			}
46 46
 
47 47
 			foreach ( $paths as $path ) {
Please login to merge, or discard this patch.
core/class-kirki-section.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
 			if ( ! isset( $args['type'] ) || ! array_key_exists( $args['type'], $this->section_types ) ) {
26 26
 				$args['type'] = 'default';
27 27
 			}
28
-			$section_classname = $this->section_types[ $args['type'] ];
28
+			$section_classname = $this->section_types[$args['type']];
29 29
 
30 30
 			$this->wp_customize->add_section( new $section_classname( $this->wp_customize, sanitize_key( $args['id'] ), array(
31 31
 				'title'           => $args['title'], // already escaped in WP Core
Please login to merge, or discard this patch.
controls/sortable/class-kirki-control-sortable.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -158,7 +158,7 @@
 block discarded – undo
158 158
 		if ( is_array( $values ) && ! empty( $values ) ) {
159 159
 			foreach ( $values as $key => $value ) {
160 160
 				if ( array_key_exists( $value, $this->choices ) ) {
161
-					$filtered_values[ $key ] = $value;
161
+					$filtered_values[$key] = $value;
162 162
 				}
163 163
 			}
164 164
 		}
Please login to merge, or discard this patch.
controls/multicolor/class-kirki-control-multicolor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -127,7 +127,7 @@
 block discarded – undo
127 127
 			$this->json['inputAttrs'] .= $attr . '="' . esc_attr( $value ) . '" ';
128 128
 		}
129 129
 
130
-		$this->json['palette']  = $this->palette;
130
+		$this->json['palette'] = $this->palette;
131 131
 	}
132 132
 
133 133
 	/**
Please login to merge, or discard this patch.
controls/typography/class-kirki-control-typography.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -129,14 +129,14 @@
 block discarded – undo
129 129
 			$available_variants = array();
130 130
 			foreach ( $variants as $variant ) {
131 131
 				if ( array_key_exists( $variant, $all_variants ) ) {
132
-					$available_variants[] = array( 'id' => $variant, 'label' => $all_variants[ $variant ] );
132
+					$available_variants[] = array( 'id' => $variant, 'label' => $all_variants[$variant] );
133 133
 				}
134 134
 			}
135 135
 
136 136
 			$available_subsets = array();
137 137
 			foreach ( $subsets as $subset ) {
138 138
 				if ( array_key_exists( $subset, $all_subsets ) ) {
139
-					$available_subsets[] = array( 'id' => $subset, 'label' => $all_subsets[ $subset ] );
139
+					$available_subsets[] = array( 'id' => $subset, 'label' => $all_subsets[$subset] );
140 140
 				}
141 141
 			}
142 142
 
Please login to merge, or discard this patch.
controls/repeater/class-kirki-control-repeater.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 			}
135 135
 
136 136
 			// Validating row label field.
137
-			if ( isset( $args['row_label']['field'] ) && ! empty( $args['row_label']['field'] ) && isset( $args['fields'][ esc_attr( $args['row_label']['field'] ) ] ) ) {
137
+			if ( isset( $args['row_label']['field'] ) && ! empty( $args['row_label']['field'] ) && isset( $args['fields'][esc_attr( $args['row_label']['field'] )] ) ) {
138 138
 				$this->row_label['field'] = esc_attr( $args['row_label']['field'] );
139 139
 			} else {
140 140
 
@@ -156,19 +156,19 @@  discard block
 block discarded – undo
156 156
 
157 157
 		foreach ( $args['fields'] as $key => $value ) {
158 158
 			if ( ! isset( $value['default'] ) ) {
159
-				$args['fields'][ $key ]['default'] = '';
159
+				$args['fields'][$key]['default'] = '';
160 160
 			}
161 161
 
162 162
 			if ( ! isset( $value['label'] ) ) {
163
-				$args['fields'][ $key ]['label'] = '';
163
+				$args['fields'][$key]['label'] = '';
164 164
 			}
165
-			$args['fields'][ $key ]['id'] = $key;
165
+			$args['fields'][$key]['id'] = $key;
166 166
 
167 167
 			// We check if the filed is an uploaded media ( image , file, video, etc.. ).
168 168
 			if ( isset( $value['type'] ) && ( 'image' === $value['type'] || 'cropped_image' === $value['type'] || 'upload' === $value['type'] ) ) {
169 169
 
170 170
 				// We add it to the list of fields that need some extra filtering/processing.
171
-				$media_fields_to_filter[ $key ] = true;
171
+				$media_fields_to_filter[$key] = true;
172 172
 			}
173 173
 
174 174
 			// If the field is a dropdown-pages field then add it to args.
@@ -185,9 +185,9 @@  discard block
 block discarded – undo
185 185
 				);
186 186
 
187 187
 				// Hackily add in the data link parameter.
188
-				$dropdown = str_replace( '<select', '<select data-field="' . esc_attr( $args['fields'][ $key ]['id'] ) . '"' . $this->get_link(), $dropdown );
188
+				$dropdown = str_replace( '<select', '<select data-field="' . esc_attr( $args['fields'][$key]['id'] ) . '"' . $this->get_link(), $dropdown );
189 189
 
190
-				$args['fields'][ $key ]['dropdown'] = $dropdown;
190
+				$args['fields'][$key]['dropdown'] = $dropdown;
191 191
 			}
192 192
 		}
193 193
 
Please login to merge, or discard this patch.
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.
field/class-kirki-field-checkbox.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
 	 *
47 47
 	 * @static
48 48
 	 * @access public
49
-	 * @param boolean|integer|string|null $value The checkbox value.
49
+	 * @param boolean|string $value The checkbox value.
50 50
 	 * @return bool
51 51
 	 */
52 52
 	public static function sanitize( $value = null ) {
Please login to merge, or discard this patch.
field/class-kirki-field-repeater.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -63,23 +63,23 @@  discard block
 block discarded – undo
63 63
 
64 64
 			// Make sure the row is formatted as an array.
65 65
 			if ( ! is_array( $row_value ) ) {
66
-				$value[ $row_id ] = array();
66
+				$value[$row_id] = array();
67 67
 				continue;
68 68
 			}
69 69
 			// Start parsing sub-fields in rows.
70 70
 			foreach ( $row_value as $subfield_id => $subfield_value ) {
71 71
 				// Make sure this is a valid subfield.
72 72
 				// If it's not, then unset it.
73
-				if ( ! isset( $this->fields[ $subfield_id ] ) ) {
74
-					unset( $value[ $row_id ][ $subfield_id ] );
73
+				if ( ! isset( $this->fields[$subfield_id] ) ) {
74
+					unset( $value[$row_id][$subfield_id] );
75 75
 				}
76 76
 				// Get the subfield-type.
77
-				$subfield_type = $this->fields[ $subfield_id ]['type'];
77
+				$subfield_type = $this->fields[$subfield_id]['type'];
78 78
 
79 79
 				// Allow using a sanitize-callback on a per-field basis.
80
-				if ( isset( $this->fields[ $subfield_id ]['sanitize_callback'] ) ) {
80
+				if ( isset( $this->fields[$subfield_id]['sanitize_callback'] ) ) {
81 81
 
82
-					$subfield_value = call_user_func( $this->fields[ $subfield_id ]['sanitize_callback'], $subfield_value );
82
+					$subfield_value = call_user_func( $this->fields[$subfield_id]['sanitize_callback'], $subfield_value );
83 83
 
84 84
 				} else {
85 85
 
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 
126 126
 					}
127 127
 				}
128
-				$value[ $row_id ][ $subfield_id ] = $subfield_value;
128
+				$value[$row_id][$subfield_id] = $subfield_value;
129 129
 			}
130 130
 		}
131 131
 
Please login to merge, or discard this patch.