@@ -42,8 +42,8 @@ discard block |
||
42 | 42 | } |
43 | 43 | $count = count( $args ); |
44 | 44 | for ( $i = 1; $i < $count; $i++ ) { |
45 | - if ( is_array( $args[ $i ] ) ) { |
|
46 | - $array = self::recurse( $array, $args[ $i ] ); |
|
45 | + if ( is_array( $args[$i] ) ) { |
|
46 | + $array = self::recurse( $array, $args[$i] ); |
|
47 | 47 | } |
48 | 48 | } |
49 | 49 | return $array; |
@@ -61,15 +61,15 @@ discard block |
||
61 | 61 | public static function recurse( $array, $array1 ) { |
62 | 62 | foreach ( $array1 as $key => $value ) { |
63 | 63 | // Create new key in $array, if it is empty or not an array. |
64 | - if ( ! isset( $array[ $key ] ) || ( isset( $array[ $key ] ) && ! is_array( $array[ $key ] ) ) ) { |
|
65 | - $array[ $key ] = array(); |
|
64 | + if ( ! isset( $array[$key] ) || ( isset( $array[$key] ) && ! is_array( $array[$key] ) ) ) { |
|
65 | + $array[$key] = array(); |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | // Overwrite the value in the base array. |
69 | 69 | if ( is_array( $value ) ) { |
70 | - $value = self::recurse( $array[ $key ], $value ); |
|
70 | + $value = self::recurse( $array[$key], $value ); |
|
71 | 71 | } |
72 | - $array[ $key ] = $value; |
|
72 | + $array[$key] = $value; |
|
73 | 73 | } |
74 | 74 | return $array; |
75 | 75 | } |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | // Properly format the array. |
152 | 152 | $items = array(); |
153 | 153 | foreach ( $posts as $post ) { |
154 | - $items[ $post->ID ] = $post->post_title; |
|
154 | + $items[$post->ID] = $post->post_title; |
|
155 | 155 | } |
156 | 156 | wp_reset_postdata(); |
157 | 157 | |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | foreach ( $taxonomies as $taxonomy ) { |
178 | 178 | $id = $taxonomy; |
179 | 179 | $taxonomy = get_taxonomy( $taxonomy ); |
180 | - $items[ $id ] = $taxonomy->labels->name; |
|
180 | + $items[$id] = $taxonomy->labels->name; |
|
181 | 181 | } |
182 | 182 | |
183 | 183 | return $items; |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | |
201 | 201 | // Build the array. |
202 | 202 | foreach ( $post_types as $post_type ) { |
203 | - $items[ $post_type->name ] = $post_type->labels->name; |
|
203 | + $items[$post_type->name] = $post_type->labels->name; |
|
204 | 204 | } |
205 | 205 | |
206 | 206 | return $items; |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | |
225 | 225 | // Build the array. |
226 | 226 | foreach ( $terms as $term ) { |
227 | - $items[ $term->term_id ] = $term->name; |
|
227 | + $items[$term->term_id] = $term->name; |
|
228 | 228 | } |
229 | 229 | |
230 | 230 | return $items; |
@@ -595,8 +595,8 @@ discard block |
||
595 | 595 | unset( $colors['primary'] ); |
596 | 596 | $position_colors = array(); |
597 | 597 | foreach ( $colors as $color_family ) { |
598 | - if ( isset( $color_family[ $key ] ) ) { |
|
599 | - $position_colors[] = $color_family[ $key ]; |
|
598 | + if ( isset( $color_family[$key] ) ) { |
|
599 | + $position_colors[] = $color_family[$key]; |
|
600 | 600 | } |
601 | 601 | } |
602 | 602 | return $position_colors; |
@@ -612,8 +612,8 @@ discard block |
||
612 | 612 | case 'primary': |
613 | 613 | return $colors['primary']; |
614 | 614 | default: |
615 | - if ( isset( $colors[ $context ] ) ) { |
|
616 | - return $colors[ $context ]; |
|
615 | + if ( isset( $colors[$context] ) ) { |
|
616 | + return $colors[$context]; |
|
617 | 617 | } |
618 | 618 | return $colors['primary']; |
619 | 619 | } |