@@ -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,23 +126,23 @@ 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( 'Theme Name', 'kirki' ); ?></td> |
133 | - <td><code><?php echo esc_html( $data['themeName'] ); ?></code></td> |
|
133 | + <td><code><?php echo esc_html( $data[ 'themeName' ] ); ?></code></td> |
|
134 | 134 | </tr> |
135 | 135 | <tr> |
136 | 136 | <td><?php esc_html_e( 'Theme Author', 'kirki' ); ?></td> |
137 | - <td><code><?php echo esc_html( $data['themeAuthor'] ); ?></code></td> |
|
137 | + <td><code><?php echo esc_html( $data[ 'themeAuthor' ] ); ?></code></td> |
|
138 | 138 | </tr> |
139 | 139 | <tr> |
140 | 140 | <td><?php esc_html_e( 'Theme URI', 'kirki' ); ?></td> |
141 | - <td><code><?php echo esc_html( $data['themeURI'] ); ?></code></td> |
|
141 | + <td><code><?php echo esc_html( $data[ 'themeURI' ] ); ?></code></td> |
|
142 | 142 | </tr> |
143 | 143 | <tr> |
144 | 144 | <td><?php esc_html_e( 'Field Types Used', 'kirki' ); ?></td> |
145 | - <td><code><?php echo esc_html( $data['fieldTypes'] ); ?></code></td> |
|
145 | + <td><code><?php echo esc_html( $data[ 'fieldTypes' ] ); ?></code></td> |
|
146 | 146 | </tr> |
147 | 147 | </tbody> |
148 | 148 | <tfoot> |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | $php_version = phpversion( 'tidy' ); |
200 | 200 | if ( ! $php_version ) { |
201 | 201 | $php_version = array_merge( explode( '.', phpversion() ), array( 0, 0 ) ); |
202 | - $php_version = "{$php_version[0]}.{$php_version[1]}"; |
|
202 | + $php_version = "{$php_version[ 0 ]}.{$php_version[ 1 ]}"; |
|
203 | 203 | } |
204 | 204 | |
205 | 205 | // Build data and return the array. |
@@ -222,11 +222,11 @@ discard block |
||
222 | 222 | public function get_field_types() { |
223 | 223 | $types = array(); |
224 | 224 | foreach ( Kirki::$fields as $field ) { |
225 | - if ( isset( $field['type'] ) ) { |
|
226 | - $types[] = $field['type']; |
|
225 | + if ( isset( $field[ 'type' ] ) ) { |
|
226 | + $types[ ] = $field[ 'type' ]; |
|
227 | 227 | } |
228 | 228 | } |
229 | - return implode( '","', $types ); |
|
229 | + return implode( '","', $types ); |
|
230 | 230 | } |
231 | 231 | |
232 | 232 | /** |
@@ -239,10 +239,10 @@ discard block |
||
239 | 239 | private function dismiss_notice() { |
240 | 240 | |
241 | 241 | // Check if this is the request we want. |
242 | - if ( isset( $_GET['_wpnonce'] ) && isset( $_GET['kirki-hide-notice'] ) ) { |
|
243 | - if ( 'telemetry' === sanitize_text_field( wp_unslash( $_GET['kirki-hide-notice'] ) ) ) { |
|
242 | + if ( isset( $_GET[ '_wpnonce' ] ) && isset( $_GET[ 'kirki-hide-notice' ] ) ) { |
|
243 | + if ( 'telemetry' === sanitize_text_field( wp_unslash( $_GET[ 'kirki-hide-notice' ] ) ) ) { |
|
244 | 244 | // Check the wp-nonce. |
245 | - if ( wp_verify_nonce( sanitize_text_field( wp_unslash( $_GET['_wpnonce'] ) ) ) ) { |
|
245 | + if ( wp_verify_nonce( sanitize_text_field( wp_unslash( $_GET[ '_wpnonce' ] ) ) ) ) { |
|
246 | 246 | // All good, we can save the option to dismiss this notice. |
247 | 247 | update_option( 'kirki_telemetry_no_consent', true ); |
248 | 248 | } |
@@ -260,10 +260,10 @@ discard block |
||
260 | 260 | private function consent() { |
261 | 261 | |
262 | 262 | // Check if this is the request we want. |
263 | - if ( isset( $_GET['_wpnonce'] ) && isset( $_GET['kirki-consent-notice'] ) ) { |
|
264 | - if ( 'telemetry' === sanitize_text_field( wp_unslash( $_GET['kirki-consent-notice'] ) ) ) { |
|
263 | + if ( isset( $_GET[ '_wpnonce' ] ) && isset( $_GET[ 'kirki-consent-notice' ] ) ) { |
|
264 | + if ( 'telemetry' === sanitize_text_field( wp_unslash( $_GET[ 'kirki-consent-notice' ] ) ) ) { |
|
265 | 265 | // Check the wp-nonce. |
266 | - if ( wp_verify_nonce( sanitize_text_field( wp_unslash( $_GET['_wpnonce'] ) ) ) ) { |
|
266 | + if ( wp_verify_nonce( sanitize_text_field( wp_unslash( $_GET[ '_wpnonce' ] ) ) ) ) { |
|
267 | 267 | // All good, we can save the option to dismiss this notice. |
268 | 268 | update_option( 'kirki_telemetry_optin', true ); |
269 | 269 | } |