@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | <div class="notice notice-info kirki-telemetry"> |
117 | 117 | <h3><strong><?php esc_html_e( 'Help us improve Kirki.', 'kirki' ); ?></strong></h3> |
118 | 118 | <p><?php esc_html_e( 'Gathering usage data about the theme you are using allows us to know which themes and field-types are most-used with the Kirki framework.', 'kirki' ); ?><br><?php esc_html_e( 'This will allow us to work closer with theme developers to improve both the theme you use and the Kirki framework.', 'kirki' ); ?></p> |
119 | - <p><strong><?php esc_html_e( 'The data is completely anonymous and we will never collect any identifyable information about you or your website.'); ?></strong></p> |
|
119 | + <p><strong><?php esc_html_e( 'The data is completely anonymous and we will never collect any identifyable information about you or your website.' ); ?></strong></p> |
|
120 | 120 | <table class="data-to-send hidden widefat"> |
121 | 121 | <thead> |
122 | 122 | <tr> |
@@ -126,31 +126,31 @@ discard block |
||
126 | 126 | <tbody> |
127 | 127 | <tr> |
128 | 128 | <td style="min-width: 200px;"><?php esc_html_e( 'PHP Version', 'kirki' ); ?></td> |
129 | - <td><code><?php echo esc_html( $data['phpVer'] ); ?></code></td> |
|
129 | + <td><code><?php echo esc_html( $data[ 'phpVer' ] ); ?></code></td> |
|
130 | 130 | </tr> |
131 | 131 | <tr> |
132 | 132 | <td><?php esc_html_e( 'ID', 'kirki' ); ?></td> |
133 | - <td><code><?php echo esc_html( $data['siteID'] ); ?></code></td> |
|
133 | + <td><code><?php echo esc_html( $data[ 'siteID' ] ); ?></code></td> |
|
134 | 134 | </tr> |
135 | 135 | <tr> |
136 | 136 | <td><?php esc_html_e( 'Theme Name', 'kirki' ); ?></td> |
137 | - <td><code><?php echo esc_html( $data['themeName'] ); ?></code></td> |
|
137 | + <td><code><?php echo esc_html( $data[ 'themeName' ] ); ?></code></td> |
|
138 | 138 | </tr> |
139 | 139 | <tr> |
140 | 140 | <td><?php esc_html_e( 'Theme Author', 'kirki' ); ?></td> |
141 | - <td><code><?php echo esc_html( $data['themeAuthor'] ); ?></code></td> |
|
141 | + <td><code><?php echo esc_html( $data[ 'themeAuthor' ] ); ?></code></td> |
|
142 | 142 | </tr> |
143 | 143 | <tr> |
144 | 144 | <td><?php esc_html_e( 'Theme URI', 'kirki' ); ?></td> |
145 | - <td><code><?php echo esc_html( $data['themeURI'] ); ?></code></td> |
|
145 | + <td><code><?php echo esc_html( $data[ 'themeURI' ] ); ?></code></td> |
|
146 | 146 | </tr> |
147 | 147 | <tr> |
148 | 148 | <td><?php esc_html_e( 'Theme Version', 'kirki' ); ?></td> |
149 | - <td><code><?php echo esc_html( $data['themeVersion'] ); ?></code></td> |
|
149 | + <td><code><?php echo esc_html( $data[ 'themeVersion' ] ); ?></code></td> |
|
150 | 150 | </tr> |
151 | 151 | <tr> |
152 | 152 | <td><?php esc_html_e( 'Field Types Used', 'kirki' ); ?></td> |
153 | - <td><code><?php echo esc_html( $data['fieldTypes'] ); ?></code></td> |
|
153 | + <td><code><?php echo esc_html( $data[ 'fieldTypes' ] ); ?></code></td> |
|
154 | 154 | </tr> |
155 | 155 | </tbody> |
156 | 156 | <tfoot> |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | $php_version = phpversion( 'tidy' ); |
208 | 208 | if ( ! $php_version ) { |
209 | 209 | $php_version = array_merge( explode( '.', phpversion() ), array( 0, 0 ) ); |
210 | - $php_version = "{$php_version[0]}.{$php_version[1]}"; |
|
210 | + $php_version = "{$php_version[ 0 ]}.{$php_version[ 1 ]}"; |
|
211 | 211 | } |
212 | 212 | |
213 | 213 | // Build data and return the array. |
@@ -232,11 +232,11 @@ discard block |
||
232 | 232 | public function get_field_types() { |
233 | 233 | $types = array(); |
234 | 234 | foreach ( Kirki::$fields as $field ) { |
235 | - if ( isset( $field['type'] ) ) { |
|
236 | - $types[] = $field['type']; |
|
235 | + if ( isset( $field[ 'type' ] ) ) { |
|
236 | + $types[ ] = $field[ 'type' ]; |
|
237 | 237 | } |
238 | 238 | } |
239 | - return implode( '","', $types ); |
|
239 | + return implode( '","', $types ); |
|
240 | 240 | } |
241 | 241 | |
242 | 242 | /** |
@@ -249,10 +249,10 @@ discard block |
||
249 | 249 | private function dismiss_notice() { |
250 | 250 | |
251 | 251 | // Check if this is the request we want. |
252 | - if ( isset( $_GET['_wpnonce'] ) && isset( $_GET['kirki-hide-notice'] ) ) { |
|
253 | - if ( 'telemetry' === sanitize_text_field( wp_unslash( $_GET['kirki-hide-notice'] ) ) ) { |
|
252 | + if ( isset( $_GET[ '_wpnonce' ] ) && isset( $_GET[ 'kirki-hide-notice' ] ) ) { |
|
253 | + if ( 'telemetry' === sanitize_text_field( wp_unslash( $_GET[ 'kirki-hide-notice' ] ) ) ) { |
|
254 | 254 | // Check the wp-nonce. |
255 | - if ( wp_verify_nonce( sanitize_text_field( wp_unslash( $_GET['_wpnonce'] ) ) ) ) { |
|
255 | + if ( wp_verify_nonce( sanitize_text_field( wp_unslash( $_GET[ '_wpnonce' ] ) ) ) ) { |
|
256 | 256 | // All good, we can save the option to dismiss this notice. |
257 | 257 | update_option( 'kirki_telemetry_no_consent', true ); |
258 | 258 | } |
@@ -270,10 +270,10 @@ discard block |
||
270 | 270 | private function consent() { |
271 | 271 | |
272 | 272 | // Check if this is the request we want. |
273 | - if ( isset( $_GET['_wpnonce'] ) && isset( $_GET['kirki-consent-notice'] ) ) { |
|
274 | - if ( 'telemetry' === sanitize_text_field( wp_unslash( $_GET['kirki-consent-notice'] ) ) ) { |
|
273 | + if ( isset( $_GET[ '_wpnonce' ] ) && isset( $_GET[ 'kirki-consent-notice' ] ) ) { |
|
274 | + if ( 'telemetry' === sanitize_text_field( wp_unslash( $_GET[ 'kirki-consent-notice' ] ) ) ) { |
|
275 | 275 | // Check the wp-nonce. |
276 | - if ( wp_verify_nonce( sanitize_text_field( wp_unslash( $_GET['_wpnonce'] ) ) ) ) { |
|
276 | + if ( wp_verify_nonce( sanitize_text_field( wp_unslash( $_GET[ '_wpnonce' ] ) ) ) ) { |
|
277 | 277 | // All good, we can save the option to dismiss this notice. |
278 | 278 | update_option( 'kirki_telemetry_optin', true ); |
279 | 279 | } |