Completed
Push — develop ( b6ce7a...32e752 )
by Aristeides
02:11
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/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.
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-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.
field/class-kirki-field-code.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -87,8 +87,8 @@
 block discarded – undo
87 87
 			'monokai'     => 'monokai',
88 88
 			'material'    => 'material',
89 89
 		);
90
-		if ( isset( $valid_themes[ $this->choices['theme'] ] ) ) {
91
-			$this->choices['theme'] = $valid_themes[ $this->choices['theme'] ];
90
+		if ( isset( $valid_themes[$this->choices['theme']] ) ) {
91
+			$this->choices['theme'] = $valid_themes[$this->choices['theme']];
92 92
 		} else {
93 93
 			$this->choices['theme'] = 'elegant';
94 94
 		}
Please login to merge, or discard this patch.
field/class-kirki-field-spacing.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
 
55 55
 		  // Sanitize each sub-value separately.
56 56
 		  foreach ( $value as $key => $sub_value ) {
57
-			$value[ $key ] = Kirki_Sanitize_Values::css_dimension( $sub_value );
57
+			$value[$key] = Kirki_Sanitize_Values::css_dimension( $sub_value );
58 58
 		  }
59 59
 		  return $value;
60 60
 
Please login to merge, or discard this patch.
field/class-kirki-field-select.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
 
65 65
 		if ( is_array( $value ) ) {
66 66
 			foreach ( $value as $key => $subvalue ) {
67
-				$value[ $key ] = esc_attr( $subvalue );
67
+				$value[$key] = esc_attr( $subvalue );
68 68
 			}
69 69
 			return $value;
70 70
 		}
Please login to merge, or discard this patch.
core/class-kirki-values.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -43,73 +43,73 @@  discard block
 block discarded – undo
43 43
 		$config_id = ( '' === $config_id ) ? 'global' : $config_id;
44 44
 
45 45
 		// Fallback to 'global' if $config_id is not found.
46
-		if ( ! isset( Kirki::$config[ $config_id ] ) ) {
46
+		if ( ! isset( Kirki::$config[$config_id] ) ) {
47 47
 			$config_id = 'global';
48 48
 		}
49 49
 
50
-		if ( 'theme_mod' === Kirki::$config[ $config_id ]['option_type'] ) {
50
+		if ( 'theme_mod' === Kirki::$config[$config_id]['option_type'] ) {
51 51
 
52 52
 			// We're using theme_mods so just get the value using get_theme_mod.
53 53
 			$default_value = null;
54
-			if ( isset( Kirki::$fields[ $field_id ] ) && isset( Kirki::$fields[ $field_id ]['default'] ) ) {
55
-				$default_value = Kirki::$fields[ $field_id ]['default'];
54
+			if ( isset( Kirki::$fields[$field_id] ) && isset( Kirki::$fields[$field_id]['default'] ) ) {
55
+				$default_value = Kirki::$fields[$field_id]['default'];
56 56
 			}
57 57
 			$value = get_theme_mod( $field_id, $default_value );
58 58
 
59 59
 			// If the field is a background field, then get the sub-fields
60 60
 			// and return an array of the values.
61
-			if ( isset( Kirki::$fields[ $field_id ] ) && isset( Kirki::$fields[ $field_id ]['type'] ) && 'background' === Kirki::$fields[ $field_id ]['type'] ) {
61
+			if ( isset( Kirki::$fields[$field_id] ) && isset( Kirki::$fields[$field_id]['type'] ) && 'background' === Kirki::$fields[$field_id]['type'] ) {
62 62
 				$value = array();
63 63
 				if ( null === $default_value ) {
64 64
 					$default_value = array();
65 65
 				}
66 66
 				foreach ( $default_value as $property_key => $property_default ) {
67
-					$value[ $property_key ] = get_theme_mod( $field_id . '_' . $property_key, $property_default );
67
+					$value[$property_key] = get_theme_mod( $field_id . '_' . $property_key, $property_default );
68 68
 				}
69 69
 			}
70
-		} elseif ( 'option' === Kirki::$config[ $config_id ]['option_type'] ) {
70
+		} elseif ( 'option' === Kirki::$config[$config_id]['option_type'] ) {
71 71
 
72 72
 			// We're using options.
73
-			if ( '' !== Kirki::$config[ $config_id ]['option_name'] ) {
73
+			if ( '' !== Kirki::$config[$config_id]['option_name'] ) {
74 74
 
75 75
 				// Options are serialized as a single option in the db.
76 76
 				// We'll have to get the option and then get the item from the array.
77
-				$options = get_option( Kirki::$config[ $config_id ]['option_name'] );
77
+				$options = get_option( Kirki::$config[$config_id]['option_name'] );
78 78
 
79
-				if ( ! isset( Kirki::$fields[ $field_id ] ) && isset( Kirki::$fields[ Kirki::$config[ $config_id ]['option_name'] . '[' . $field_id . ']' ] ) ) {
80
-					$field_id = Kirki::$config[ $config_id ]['option_name'] . '[' . $field_id . ']';
79
+				if ( ! isset( Kirki::$fields[$field_id] ) && isset( Kirki::$fields[Kirki::$config[$config_id]['option_name'] . '[' . $field_id . ']'] ) ) {
80
+					$field_id = Kirki::$config[$config_id]['option_name'] . '[' . $field_id . ']';
81 81
 				}
82
-				$setting_modified = str_replace( ']', '', str_replace( Kirki::$config[ $config_id ]['option_name'] . '[', '', $field_id ) );
82
+				$setting_modified = str_replace( ']', '', str_replace( Kirki::$config[$config_id]['option_name'] . '[', '', $field_id ) );
83 83
 
84 84
 				// If this is a background field, get the individual sub-fields and return an array.
85
-				if ( 'background' === Kirki::$fields[ $field_id ]['type'] ) {
85
+				if ( 'background' === Kirki::$fields[$field_id]['type'] ) {
86 86
 					$value = array();
87 87
 
88
-					foreach ( Kirki::$fields[ $field_id ]['default'] as $property => $property_default ) {
88
+					foreach ( Kirki::$fields[$field_id]['default'] as $property => $property_default ) {
89 89
 
90
-						if ( isset( $options[ $setting_modified . '_' . $property ] ) ) {
91
-							$value[ $property ] = $options[ $setting_modified . '_' . $property ];
90
+						if ( isset( $options[$setting_modified . '_' . $property] ) ) {
91
+							$value[$property] = $options[$setting_modified . '_' . $property];
92 92
 						} else {
93
-							$value[ $property ] = $property_default;
93
+							$value[$property] = $property_default;
94 94
 						}
95 95
 					}
96 96
 				} else {
97 97
 
98 98
 					// This is not a background field so continue and get the value.
99
-					$value = ( isset( $options[ $setting_modified ] ) ) ? $options[ $setting_modified ] : Kirki::$fields[ $field_id ]['default'];
99
+					$value = ( isset( $options[$setting_modified] ) ) ? $options[$setting_modified] : Kirki::$fields[$field_id]['default'];
100 100
 					$value = maybe_unserialize( $value );
101 101
 				}
102 102
 			} else {
103 103
 
104 104
 				// Each option separately saved in the db.
105
-				$value = get_option( $field_id, Kirki::$fields[ $field_id ]['default'] );
105
+				$value = get_option( $field_id, Kirki::$fields[$field_id]['default'] );
106 106
 
107 107
 				// If the field is a background field, then get the sub-fields.
108 108
 				// and return an array of the values.
109
-				if ( 'background' === Kirki::$fields[ $field_id ]['type'] ) {
109
+				if ( 'background' === Kirki::$fields[$field_id]['type'] ) {
110 110
 					$value = array();
111
-					foreach ( Kirki::$fields[ $field_id ]['default'] as $property_key => $property_default ) {
112
-						$value[ $property_key ] = get_option( $field_id . '_' . $property_key, $property_default );
111
+					foreach ( Kirki::$fields[$field_id]['default'] as $property_key => $property_default ) {
112
+						$value[$property_key] = get_option( $field_id . '_' . $property_key, $property_default );
113 113
 					}
114 114
 				}
115 115
 			}
@@ -135,8 +135,8 @@  discard block
 block discarded – undo
135 135
 			if ( isset( $field['option_name'] ) && '' !== $field['option_name'] ) {
136 136
 				$all_values = get_option( $field['option_name'], array() );
137 137
 				$sub_setting_id = str_replace( array( ']', $field['option_name'] . '[' ), '', $field['settings'] );
138
-				if ( isset( $all_values[ $sub_setting_id ] ) ) {
139
-					$value = $all_values[ $sub_setting_id ];
138
+				if ( isset( $all_values[$sub_setting_id] ) ) {
139
+					$value = $all_values[$sub_setting_id];
140 140
 				}
141 141
 			} else {
142 142
 				$value = get_option( $field['settings'], $field['default'] );
Please login to merge, or discard this patch.