| 1 |
<?php |
| 2 |
|
| 3 |
/** |
| 4 |
* Class for providing data for usage reporting component |
| 5 |
*/ |
| 6 |
|
| 7 |
namespace WPSynchro\Utilities\JSData; |
| 8 |
|
| 9 |
class UsageReportingData |
| 10 |
{ |
| 11 |
/** |
| 12 |
* Load the JS data for Usage reporting component |
| 13 |
*/ |
| 14 |
public function load() |
| 15 |
{ |
| 16 |
$usage_reporting_localize = [ |
| 17 |
'introtext' => __('Help us understand how you use WP Synchro', 'wpsynchro'), |
| 18 |
'text1' => __('Would you like to allow us to send fully anonymized usage data to our server to help improve WP Synchro?<br>No personal data is collected.', 'wpsynchro'), |
| 19 |
'accept' => __('I accept', 'wpsynchro'), |
| 20 |
'decline' => __('No thanks', 'wpsynchro'), |
| 21 |
|
| 22 |
]; |
| 23 |
wp_localize_script('wpsynchro_admin_js', 'wpsynchro_usage_reporting', $usage_reporting_localize); |
| 24 |
} |
| 25 |
} |
| 26 |
|