|
@@ -115,7 +115,7 @@ discard block |
|
|
block discarded – undo |
|
115
|
115
|
<div class="notice notice-info kirki-telemetry"> |
|
116
|
116
|
<h3><strong><?php esc_html_e( 'Help us improve Kirki.', 'kirki' ); ?></strong></h3> |
|
117
|
117
|
<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> |
|
118
|
|
- <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> |
|
|
118
|
+ <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
|
119
|
<table class="data-to-send hidden widefat"> |
|
120
|
120
|
<thead> |
|
121
|
121
|
<tr> |
|
@@ -125,31 +125,31 @@ discard block |
|
|
block discarded – undo |
|
125
|
125
|
<tbody> |
|
126
|
126
|
<tr> |
|
127
|
127
|
<td style="min-width: 200px;"><?php esc_html_e( 'PHP Version', 'kirki' ); ?></td> |
|
128
|
|
- <td><code><?php echo esc_html( $data['phpVer'] ); ?></code></td> |
|
|
128
|
+ <td><code><?php echo esc_html( $data[ 'phpVer' ] ); ?></code></td> |
|
129
|
129
|
</tr> |
|
130
|
130
|
<tr> |
|
131
|
131
|
<td><?php esc_html_e( 'ID', 'kirki' ); ?></td> |
|
132
|
|
- <td><code><?php echo esc_html( $data['siteID'] ); ?></code></td> |
|
|
132
|
+ <td><code><?php echo esc_html( $data[ 'siteID' ] ); ?></code></td> |
|
133
|
133
|
</tr> |
|
134
|
134
|
<tr> |
|
135
|
135
|
<td><?php esc_html_e( 'Theme Name', 'kirki' ); ?></td> |
|
136
|
|
- <td><code><?php echo esc_html( $data['themeName'] ); ?></code></td> |
|
|
136
|
+ <td><code><?php echo esc_html( $data[ 'themeName' ] ); ?></code></td> |
|
137
|
137
|
</tr> |
|
138
|
138
|
<tr> |
|
139
|
139
|
<td><?php esc_html_e( 'Theme Author', 'kirki' ); ?></td> |
|
140
|
|
- <td><code><?php echo esc_html( $data['themeAuthor'] ); ?></code></td> |
|
|
140
|
+ <td><code><?php echo esc_html( $data[ 'themeAuthor' ] ); ?></code></td> |
|
141
|
141
|
</tr> |
|
142
|
142
|
<tr> |
|
143
|
143
|
<td><?php esc_html_e( 'Theme URI', 'kirki' ); ?></td> |
|
144
|
|
- <td><code><?php echo esc_html( $data['themeURI'] ); ?></code></td> |
|
|
144
|
+ <td><code><?php echo esc_html( $data[ 'themeURI' ] ); ?></code></td> |
|
145
|
145
|
</tr> |
|
146
|
146
|
<tr> |
|
147
|
147
|
<td><?php esc_html_e( 'Theme Version', 'kirki' ); ?></td> |
|
148
|
|
- <td><code><?php echo esc_html( $data['themeVersion'] ); ?></code></td> |
|
|
148
|
+ <td><code><?php echo esc_html( $data[ 'themeVersion' ] ); ?></code></td> |
|
149
|
149
|
</tr> |
|
150
|
150
|
<tr> |
|
151
|
151
|
<td><?php esc_html_e( 'Field Types Used', 'kirki' ); ?></td> |
|
152
|
|
- <td><code><?php echo esc_html( $data['fieldTypes'] ); ?></code></td> |
|
|
152
|
+ <td><code><?php echo esc_html( $data[ 'fieldTypes' ] ); ?></code></td> |
|
153
|
153
|
</tr> |
|
154
|
154
|
</tbody> |
|
155
|
155
|
<tfoot> |
|
@@ -206,7 +206,7 @@ discard block |
|
|
block discarded – undo |
|
206
|
206
|
$php_version = phpversion( 'tidy' ); |
|
207
|
207
|
if ( ! $php_version ) { |
|
208
|
208
|
$php_version = array_merge( explode( '.', phpversion() ), array( 0, 0 ) ); |
|
209
|
|
- $php_version = "{$php_version[0]}.{$php_version[1]}"; |
|
|
209
|
+ $php_version = "{$php_version[ 0 ]}.{$php_version[ 1 ]}"; |
|
210
|
210
|
} |
|
211
|
211
|
|
|
212
|
212
|
// Build data and return the array. |
|
@@ -231,11 +231,11 @@ discard block |
|
|
block discarded – undo |
|
231
|
231
|
public function get_field_types() { |
|
232
|
232
|
$types = array(); |
|
233
|
233
|
foreach ( Kirki::$fields as $field ) { |
|
234
|
|
- if ( isset( $field['type'] ) ) { |
|
235
|
|
- $types[] = $field['type']; |
|
|
234
|
+ if ( isset( $field[ 'type' ] ) ) { |
|
|
235
|
+ $types[ ] = $field[ 'type' ]; |
|
236
|
236
|
} |
|
237
|
237
|
} |
|
238
|
|
- return '["' . implode( '","', array_unique( $types ) ) . '"]'; |
|
|
238
|
+ return '["' . implode( '","', array_unique( $types ) ) . '"]'; |
|
239
|
239
|
} |
|
240
|
240
|
|
|
241
|
241
|
/** |
|
@@ -248,10 +248,10 @@ discard block |
|
|
block discarded – undo |
|
248
|
248
|
private function dismiss_notice() { |
|
249
|
249
|
|
|
250
|
250
|
// Check if this is the request we want. |
|
251
|
|
- if ( isset( $_GET['_wpnonce'] ) && isset( $_GET['kirki-hide-notice'] ) ) { |
|
252
|
|
- if ( 'telemetry' === sanitize_text_field( wp_unslash( $_GET['kirki-hide-notice'] ) ) ) { |
|
|
251
|
+ if ( isset( $_GET[ '_wpnonce' ] ) && isset( $_GET[ 'kirki-hide-notice' ] ) ) { |
|
|
252
|
+ if ( 'telemetry' === sanitize_text_field( wp_unslash( $_GET[ 'kirki-hide-notice' ] ) ) ) { |
|
253
|
253
|
// Check the wp-nonce. |
|
254
|
|
- if ( wp_verify_nonce( sanitize_text_field( wp_unslash( $_GET['_wpnonce'] ) ) ) ) { |
|
|
254
|
+ if ( wp_verify_nonce( sanitize_text_field( wp_unslash( $_GET[ '_wpnonce' ] ) ) ) ) { |
|
255
|
255
|
// All good, we can save the option to dismiss this notice. |
|
256
|
256
|
update_option( 'kirki_telemetry_no_consent', true ); |
|
257
|
257
|
} |
|
@@ -269,10 +269,10 @@ discard block |
|
|
block discarded – undo |
|
269
|
269
|
private function consent() { |
|
270
|
270
|
|
|
271
|
271
|
// Check if this is the request we want. |
|
272
|
|
- if ( isset( $_GET['_wpnonce'] ) && isset( $_GET['kirki-consent-notice'] ) ) { |
|
273
|
|
- if ( 'telemetry' === sanitize_text_field( wp_unslash( $_GET['kirki-consent-notice'] ) ) ) { |
|
|
272
|
+ if ( isset( $_GET[ '_wpnonce' ] ) && isset( $_GET[ 'kirki-consent-notice' ] ) ) { |
|
|
273
|
+ if ( 'telemetry' === sanitize_text_field( wp_unslash( $_GET[ 'kirki-consent-notice' ] ) ) ) { |
|
274
|
274
|
// Check the wp-nonce. |
|
275
|
|
- if ( wp_verify_nonce( sanitize_text_field( wp_unslash( $_GET['_wpnonce'] ) ) ) ) { |
|
|
275
|
+ if ( wp_verify_nonce( sanitize_text_field( wp_unslash( $_GET[ '_wpnonce' ] ) ) ) ) { |
|
276
|
276
|
// All good, we can save the option to dismiss this notice. |
|
277
|
277
|
update_option( 'kirki_telemetry_optin', true ); |
|
278
|
278
|
} |