@@ -159,7 +159,7 @@ |
||
159 | 159 | foreach ( $value as $key => $subvalue ) { |
160 | 160 | |
161 | 161 | if ( in_array( $key, array( 'font-size', 'letter-spacing', 'word-spacing', 'line-height' ), true ) ) { |
162 | - $value[ $key ] = Kirki_Sanitize_Values::css_dimension( $value[ $key ] ); |
|
162 | + $value[$key] = Kirki_Sanitize_Values::css_dimension( $value[$key] ); |
|
163 | 163 | } elseif ( 'text-align' === $key && ! in_array( $value['text-align'], array( 'inherit', 'left', 'center', 'right', 'justify' ), true ) ) { |
164 | 164 | $value['text-align'] = 'inherit'; |
165 | 165 | } elseif ( 'text-transform' === $key && ! in_array( $value['text-transform'], array( 'none', 'capitalize', 'uppercase', 'lowercase', 'initial', 'inherit' ), true ) ) { |
@@ -111,12 +111,12 @@ discard block |
||
111 | 111 | |
112 | 112 | foreach ( $args['fields'] as $key => $value ) { |
113 | 113 | if ( ! isset( $value['default'] ) ) { |
114 | - $args['fields'][ $key ]['default'] = ''; |
|
114 | + $args['fields'][$key]['default'] = ''; |
|
115 | 115 | } |
116 | 116 | if ( ! isset( $value['label'] ) ) { |
117 | - $args['fields'][ $key ]['label'] = ''; |
|
117 | + $args['fields'][$key]['label'] = ''; |
|
118 | 118 | } |
119 | - $args['fields'][ $key ]['id'] = $key; |
|
119 | + $args['fields'][$key]['id'] = $key; |
|
120 | 120 | |
121 | 121 | // We check if the filed is an uploaded media ( image , file, video, etc.. ). |
122 | 122 | if ( isset( $value['type'] ) ) { |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | case 'cropped_image': |
126 | 126 | case 'upload': |
127 | 127 | // We add it to the list of fields that need some extra filtering/processing. |
128 | - $media_fields_to_filter[ $key ] = true; |
|
128 | + $media_fields_to_filter[$key] = true; |
|
129 | 129 | break; |
130 | 130 | |
131 | 131 | case 'dropdown-pages': |
@@ -140,8 +140,8 @@ discard block |
||
140 | 140 | ) |
141 | 141 | ); |
142 | 142 | // Hackily add in the data link parameter. |
143 | - $dropdown = str_replace( '<select', '<select data-field="' . esc_attr( $args['fields'][ $key ]['id'] ) . '"' . $this->get_link(), $dropdown ); |
|
144 | - $args['fields'][ $key ]['dropdown'] = $dropdown; |
|
143 | + $dropdown = str_replace( '<select', '<select data-field="' . esc_attr( $args['fields'][$key]['id'] ) . '"' . $this->get_link(), $dropdown ); |
|
144 | + $args['fields'][$key]['dropdown'] = $dropdown; |
|
145 | 145 | break; |
146 | 146 | } |
147 | 147 | } |
@@ -555,7 +555,7 @@ discard block |
||
555 | 555 | } |
556 | 556 | |
557 | 557 | // Validating row label field. |
558 | - if ( isset( $args['row_label']['field'] ) && ! empty( $args['row_label']['field'] ) && isset( $args['fields'][ esc_attr( $args['row_label']['field'] ) ] ) ) { |
|
558 | + if ( isset( $args['row_label']['field'] ) && ! empty( $args['row_label']['field'] ) && isset( $args['fields'][esc_attr( $args['row_label']['field'] )] ) ) { |
|
559 | 559 | $this->row_label['field'] = esc_attr( $args['row_label']['field'] ); |
560 | 560 | } else { |
561 | 561 | // If from field is not set correctly, making sure standard is set as the type. |
@@ -591,6 +591,6 @@ discard block |
||
591 | 591 | if ( false === $id ) { |
592 | 592 | return $translation_strings; |
593 | 593 | } |
594 | - return $translation_strings[ $id ]; |
|
594 | + return $translation_strings[$id]; |
|
595 | 595 | } |
596 | 596 | } |
@@ -35,7 +35,7 @@ |
||
35 | 35 | $property = $output['property'] . '-' . $key; |
36 | 36 | } |
37 | 37 | $output['media_query'] = ( isset( $output['media_query'] ) ) ? $output['media_query'] : 'global'; |
38 | - $this->styles[ $output['media_query'] ][ $output['element'] ][ $property ] = $sub_value; |
|
38 | + $this->styles[$output['media_query']][$output['element']][$property] = $sub_value; |
|
39 | 39 | |
40 | 40 | } |
41 | 41 | } |
@@ -38,14 +38,14 @@ |
||
38 | 38 | // Add backup font. |
39 | 39 | if ( Kirki_Fonts::is_google_font( $this->value ) ) { |
40 | 40 | |
41 | - if ( isset( $google_fonts_array[ $this->value ] ) && isset( $google_fonts_array[ $this->value ]['category'] ) ) { |
|
42 | - if ( isset( $backup_fonts[ $google_fonts_array[ $this->value ]['category'] ] ) ) { |
|
41 | + if ( isset( $google_fonts_array[$this->value] ) && isset( $google_fonts_array[$this->value]['category'] ) ) { |
|
42 | + if ( isset( $backup_fonts[$google_fonts_array[$this->value]['category']] ) ) { |
|
43 | 43 | |
44 | 44 | // Add double quotes if needed. |
45 | 45 | if ( false !== strpos( $this->value, ' ' ) && false === strpos( $this->value, '"' ) ) { |
46 | - $this->value = '"' . $this->value . '", ' . $backup_fonts[ $google_fonts_array[ $this->value ]['category'] ]; |
|
46 | + $this->value = '"' . $this->value . '", ' . $backup_fonts[$google_fonts_array[$this->value]['category']]; |
|
47 | 47 | } else { |
48 | - $this->value .= ', ' . $backup_fonts[ $google_fonts_array[ $this->value ]['category'] ]; |
|
48 | + $this->value .= ', ' . $backup_fonts[$google_fonts_array[$this->value]['category']]; |
|
49 | 49 | } |
50 | 50 | } |
51 | 51 | } |
@@ -105,14 +105,14 @@ discard block |
||
105 | 105 | $available_variants = array(); |
106 | 106 | foreach ( $variants as $variant ) { |
107 | 107 | if ( array_key_exists( $variant, $all_variants ) ) { |
108 | - $available_variants[] = array( 'id' => $variant, 'label' => $all_variants[ $variant ] ); |
|
108 | + $available_variants[] = array( 'id' => $variant, 'label' => $all_variants[$variant] ); |
|
109 | 109 | } |
110 | 110 | } |
111 | 111 | |
112 | 112 | $available_subsets = array(); |
113 | 113 | foreach ( $subsets as $subset ) { |
114 | 114 | if ( array_key_exists( $subset, $all_subsets ) ) { |
115 | - $available_subsets[] = array( 'id' => $subset, 'label' => $all_subsets[ $subset ] ); |
|
115 | + $available_subsets[] = array( 'id' => $subset, 'label' => $all_subsets[$subset] ); |
|
116 | 116 | } |
117 | 117 | } |
118 | 118 | |
@@ -388,7 +388,7 @@ discard block |
||
388 | 388 | if ( false === $id ) { |
389 | 389 | return $translation_strings; |
390 | 390 | } |
391 | - return $translation_strings[ $id ]; |
|
391 | + return $translation_strings[$id]; |
|
392 | 392 | } |
393 | 393 | |
394 | 394 | /** |
@@ -52,7 +52,7 @@ |
||
52 | 52 | |
53 | 53 | // Sanitize each sub-value separately. |
54 | 54 | foreach ( $value as $key => $sub_value ) { |
55 | - $value[ $key ] = Kirki_Sanitize_Values::css_dimension( $sub_value ); |
|
55 | + $value[$key] = Kirki_Sanitize_Values::css_dimension( $sub_value ); |
|
56 | 56 | } |
57 | 57 | return $value; |
58 | 58 |
@@ -50,7 +50,7 @@ |
||
50 | 50 | $section_classname = 'WP_Customize_Section'; |
51 | 51 | |
52 | 52 | if ( isset( $args['type'] ) && array_key_exists( $args['type'], $this->section_types ) ) { |
53 | - $section_classname = $this->section_types[ $args['type'] ]; |
|
53 | + $section_classname = $this->section_types[$args['type']]; |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | // Add the section. |
@@ -49,7 +49,7 @@ |
||
49 | 49 | if ( ! isset( $args['type'] ) || ! array_key_exists( $args['type'], $this->panel_types ) ) { |
50 | 50 | $args['type'] = 'default'; |
51 | 51 | } |
52 | - $panel_classname = $this->panel_types[ $args['type'] ]; |
|
52 | + $panel_classname = $this->panel_types[$args['type']]; |
|
53 | 53 | |
54 | 54 | $wp_customize->add_panel( new $panel_classname( $wp_customize, sanitize_key( $args['id'] ), $args ) ); |
55 | 55 |
@@ -70,9 +70,9 @@ |
||
70 | 70 | // Make sure that every row is an array, not an object. |
71 | 71 | foreach ( $sanitized as $key => $_value ) { |
72 | 72 | if ( empty( $_value ) ) { |
73 | - unset( $sanitized[ $key ] ); |
|
73 | + unset( $sanitized[$key] ); |
|
74 | 74 | } else { |
75 | - $sanitized[ $key ] = (array) $_value; |
|
75 | + $sanitized[$key] = (array) $_value; |
|
76 | 76 | } |
77 | 77 | } |
78 | 78 |