@@ -40,8 +40,8 @@ |
||
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 ) { |
@@ -25,7 +25,7 @@ |
||
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 |
@@ -127,7 +127,7 @@ |
||
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 | /** |
@@ -50,9 +50,9 @@ |
||
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 |
@@ -63,23 +63,23 @@ discard block |
||
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 |
||
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 |
@@ -87,8 +87,8 @@ |
||
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 | } |
@@ -54,7 +54,7 @@ |
||
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 |
@@ -64,7 +64,7 @@ |
||
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 | } |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | $class_name = 'WP_Customize_Control'; |
68 | 68 | // Get the classname from the array of control classnames. |
69 | 69 | if ( array_key_exists( $args['type'], $this->control_types ) ) { |
70 | - $class_name = $this->control_types[ $args['type'] ]; |
|
70 | + $class_name = $this->control_types[$args['type']]; |
|
71 | 71 | } |
72 | 72 | return $class_name; |
73 | 73 | |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | foreach ( $this->control_types as $key => $classname ) { |
134 | 134 | |
135 | 135 | if ( ! class_exists( $classname ) ) { |
136 | - unset( $this->control_types[ $key ] ); |
|
136 | + unset( $this->control_types[$key] ); |
|
137 | 137 | } |
138 | 138 | } |
139 | 139 | } |