@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | <div class="notice notice-info kirki-telemetry"> |
115 | 115 | <h3><strong><?php esc_html_e( 'Help us improve Kirki.', 'kirki' ); ?></strong></h3> |
116 | 116 | <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> |
117 | - <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> |
|
117 | + <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 | 118 | <table class="data-to-send hidden widefat"> |
119 | 119 | <thead> |
120 | 120 | <tr> |
@@ -124,23 +124,23 @@ discard block |
||
124 | 124 | <tbody> |
125 | 125 | <tr> |
126 | 126 | <td style="min-width: 200px;"><?php esc_html_e( 'PHP Version', 'kirki' ); ?></td> |
127 | - <td><code><?php echo esc_html( $data['phpVer'] ); ?></code></td> |
|
127 | + <td><code><?php echo esc_html( $data[ 'phpVer' ] ); ?></code></td> |
|
128 | 128 | </tr> |
129 | 129 | <tr> |
130 | 130 | <td><?php esc_html_e( 'Theme Name', 'kirki' ); ?></td> |
131 | - <td><code><?php echo esc_html( $data['themeName'] ); ?></code></td> |
|
131 | + <td><code><?php echo esc_html( $data[ 'themeName' ] ); ?></code></td> |
|
132 | 132 | </tr> |
133 | 133 | <tr> |
134 | 134 | <td><?php esc_html_e( 'Theme Author', 'kirki' ); ?></td> |
135 | - <td><code><?php echo esc_html( $data['themeAuthor'] ); ?></code></td> |
|
135 | + <td><code><?php echo esc_html( $data[ 'themeAuthor' ] ); ?></code></td> |
|
136 | 136 | </tr> |
137 | 137 | <tr> |
138 | 138 | <td><?php esc_html_e( 'Theme URI', 'kirki' ); ?></td> |
139 | - <td><code><?php echo esc_html( $data['themeURI'] ); ?></code></td> |
|
139 | + <td><code><?php echo esc_html( $data[ 'themeURI' ] ); ?></code></td> |
|
140 | 140 | </tr> |
141 | 141 | <tr> |
142 | 142 | <td><?php esc_html_e( 'Field Types Used', 'kirki' ); ?></td> |
143 | - <td><code><?php echo esc_html( implode( ',', $data['fieldTypes'] ) ); ?></code></td> |
|
143 | + <td><code><?php echo esc_html( implode( ',', $data[ 'fieldTypes' ] ) ); ?></code></td> |
|
144 | 144 | </tr> |
145 | 145 | </tbody> |
146 | 146 | <tfoot> |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | $php_version = phpversion( 'tidy' ); |
196 | 196 | if ( ! $php_version ) { |
197 | 197 | $php_version = array_merge( explode( '.', phpversion() ), array( 0, 0 ) ); |
198 | - $php_version = "{$php_version[0]}.{$php_version[1]}"; |
|
198 | + $php_version = "{$php_version[ 0 ]}.{$php_version[ 1 ]}"; |
|
199 | 199 | } |
200 | 200 | |
201 | 201 | // Build data and return the array. |
@@ -218,8 +218,8 @@ discard block |
||
218 | 218 | public function get_field_types() { |
219 | 219 | $types = array(); |
220 | 220 | foreach ( Kirki::$fields as $field ) { |
221 | - if ( isset( $field['type'] ) ) { |
|
222 | - $types[] = $field['type']; |
|
221 | + if ( isset( $field[ 'type' ] ) ) { |
|
222 | + $types[ ] = $field[ 'type' ]; |
|
223 | 223 | } |
224 | 224 | } |
225 | 225 | return $types; |
@@ -235,10 +235,10 @@ discard block |
||
235 | 235 | private function dismiss_notice() { |
236 | 236 | |
237 | 237 | // Check if this is the request we want. |
238 | - if ( isset( $_GET['_wpnonce'] ) && isset( $_GET['kirki-hide-notice'] ) ) { |
|
239 | - if ( 'telemetry' === sanitize_text_field( wp_unslash( $_GET['kirki-hide-notice'] ) ) ) { |
|
238 | + if ( isset( $_GET[ '_wpnonce' ] ) && isset( $_GET[ 'kirki-hide-notice' ] ) ) { |
|
239 | + if ( 'telemetry' === sanitize_text_field( wp_unslash( $_GET[ 'kirki-hide-notice' ] ) ) ) { |
|
240 | 240 | // Check the wp-nonce. |
241 | - if ( wp_verify_nonce( sanitize_text_field( wp_unslash( $_GET['_wpnonce'] ) ) ) ) { |
|
241 | + if ( wp_verify_nonce( sanitize_text_field( wp_unslash( $_GET[ '_wpnonce' ] ) ) ) ) { |
|
242 | 242 | // All good, we can save the option to dismiss this notice. |
243 | 243 | update_option( 'kirki_telemetry_no_consent', true ); |
244 | 244 | } |
@@ -256,10 +256,10 @@ discard block |
||
256 | 256 | private function consent() { |
257 | 257 | |
258 | 258 | // Check if this is the request we want. |
259 | - if ( isset( $_GET['_wpnonce'] ) && isset( $_GET['kirki-consent-notice'] ) ) { |
|
260 | - if ( 'telemetry' === sanitize_text_field( wp_unslash( $_GET['kirki-consent-notice'] ) ) ) { |
|
259 | + if ( isset( $_GET[ '_wpnonce' ] ) && isset( $_GET[ 'kirki-consent-notice' ] ) ) { |
|
260 | + if ( 'telemetry' === sanitize_text_field( wp_unslash( $_GET[ 'kirki-consent-notice' ] ) ) ) { |
|
261 | 261 | // Check the wp-nonce. |
262 | - if ( wp_verify_nonce( sanitize_text_field( wp_unslash( $_GET['_wpnonce'] ) ) ) ) { |
|
262 | + if ( wp_verify_nonce( sanitize_text_field( wp_unslash( $_GET[ '_wpnonce' ] ) ) ) ) { |
|
263 | 263 | // All good, we can save the option to dismiss this notice. |
264 | 264 | update_option( 'kirki_telemetry_optin', true ); |
265 | 265 | } |