| @@ -1,15 +1,15 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | /* |
| 3 | 3 | * Plugin Name: Simple Analytics Official |
| 4 | - * Version: 1.106 | |
| 4 | + * Version: 1.110 | |
| 5 | 5 | * Plugin URI: https://docs.simpleanalytics.com/install-simple-analytics-on-wordpress |
| 6 | 6 | * Description: Embed Simple Analytics script in your WordPress website |
| 7 | 7 | * Author: Simple Analytics |
| 8 | 8 | * Author URI: https://simpleanalytics.com/ |
| 9 | - * Requires at least: 6.9.3 | |
| 10 | - * Requires PHP: 7.2.0 | |
| 11 | - * Tested up to: 7.0 | |
| 9 | + * Requires at least: 7.0.3 | |
| 10 | + * Requires PHP: 7.4.0 | |
| 11 | + * Tested up to: 7.1 | |
| 12 | 12 | * |
| 13 | 13 | * Text Domain: simple-analytics |
| 14 | 14 | * Domain Path: /lang/ |
| 15 | 15 | * |
| @@ -47,8 +47,9 @@ | ||
| 47 | 47 | require __DIR__ . '/src/Actions/AddInactiveComment.php'; |
| 48 | 48 | require __DIR__ . '/src/Actions/AddNoScriptTag.php'; |
| 49 | 49 | require __DIR__ . '/src/Actions/AddPluginSettingsLink.php'; |
| 50 | 50 | require __DIR__ . '/src/Support/Str.php'; |
| 51 | +require __DIR__ . '/src/Support/OnloadCallback.php'; | |
| 51 | 52 | require __DIR__ . '/src/Settings/Block.php'; |
| 52 | 53 | require __DIR__ . '/src/Settings/Blocks/CalloutBlock.php'; |
| 53 | 54 | require __DIR__ . '/src/Settings/Concerns/HasDocs.php'; |
| 54 | 55 | require __DIR__ . '/src/Settings/Concerns/HasPlaceholder.php'; |
| @@ -76,12 +77,8 @@ | ||
| 76 | 77 | |
| 77 | 78 | $adminPage = SimpleAnalytics\Settings\AdminPage::title('Simple Analytics') |
| 78 | 79 | ->slug('simpleanalytics') |
| 79 | 80 | ->tab('General', function (Tab $tab) { |
| 80 | - $tab->input(SettingName::CUSTOM_DOMAIN, 'Custom Domain') | |
| 81 | - ->placeholder('Enter your custom domain or leave it empty.') | |
| 82 | - ->description('E.g. api.example.com. Leave empty to use the default domain (most users).') | |
| 83 | - ->docs('https://docs.simpleanalytics.com/bypass-ad-blockers'); | |
| 84 | 81 | }) |
| 85 | 82 | ->tab('Ignore Rules', function (Tab $tab) { |
| 86 | 83 | $tab->icon(get_icon('eye-slash')); |
| 87 | 84 | |
| @@ -104,8 +101,13 @@ | ||
| 104 | 101 | }) |
| 105 | 102 | ->tab('Advanced', function (Tab $tab) { |
| 106 | 103 | $tab->icon(get_icon('cog')); |
| 107 | 104 | |
| 105 | + $tab->input(SettingName::CUSTOM_DOMAIN, 'Custom Domain') | |
| 106 | + ->placeholder('Enter your custom domain or leave it empty.') | |
| 107 | + ->description('E.g. api.example.com. Leave empty to use the default domain (most users).') | |
| 108 | + ->docs('https://docs.simpleanalytics.com/bypass-ad-blockers'); | |
| 109 | + | |
| 108 | 110 | $tab->checkbox(SettingName::COLLECT_DNT, 'Collect Do Not Track') |
| 109 | 111 | ->description('If you want to collect visitors with Do Not Track enabled, turn this on.') |
| 110 | 112 | ->docs('https://docs.simpleanalytics.com/dnt'); |
| 111 | 113 | |
| @@ -120,9 +122,9 @@ | ||
| 120 | 122 | $tab->checkbox(SettingName::NOSCRIPT, 'Support no JavaScript mode') |
| 121 | 123 | ->description('Collect analytics from visitors with disabled or no JavaScript.'); |
| 122 | 124 | |
| 123 | 125 | $tab->input(SettingName::ONLOAD_CALLBACK, 'Onload Callback') |
| 124 | - ->description('JavaScript function to call when the script is loaded.') | |
| 126 | + ->description('JavaScript to run when the script loads. Requires permission to save unfiltered HTML. After upgrading, save an existing callback again to enable it.') | |
| 125 | 127 | ->placeholder('Example: sa_event("My event")') |
| 126 | 128 | ->docs('https://docs.simpleanalytics.com/trigger-custom-page-views#use-custom-collection-anyway'); |
| 127 | 129 | |
| 128 | 130 | $tab->input(SettingName::HOSTNAME, 'Overwrite domain name') |