access.php
7 months ago
adblocker-notice.php
7 months ago
advanced_settings.php
10 months ago
exclusion_settings.php
4 years ago
geolocation_settings.php
2 years ago
get_started.php
2 months ago
import_wp_statistics.php
2 months ago
info.php
2 months ago
info_bug_report.php
2 years ago
info_help.php
1 year ago
info_high_traffic.php
2 years ago
info_matomo_desc.php
1 year ago
info_multisite.php
2 months ago
info_newsletter.php
4 years ago
info_shared.php
1 year ago
marketplace.php
3 months ago
marketplace_setup_wizard.php
3 months ago
marketplace_setup_wizard_body.php
3 months ago
measurable_settings.php
2 years ago
privacy_gdpr.php
4 years ago
scheduled_tasks_failures.php
2 years ago
settings.php
2 months ago
settings_errors.php
4 years ago
summary.php
2 months ago
systemreport.php
2 months ago
tracking.php
4 months ago
update_notice_clear_cache.php
5 years ago
whats-new-notifications.php
1 year ago
import_wp_statistics.php
67 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Matomo - free/libre analytics platform |
| 4 | * |
| 5 | * @link https://matomo.org |
| 6 | * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later |
| 7 | * @package matomo |
| 8 | */ |
| 9 | /** |
| 10 | * phpcs considers all of our variables as global and want them prefixed with matomo |
| 11 | * phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound |
| 12 | */ |
| 13 | use WpMatomo\Admin\AdminSettings; |
| 14 | use WpMatomo\Admin\GetStarted; |
| 15 | use WpMatomo\Admin\Menu; |
| 16 | use WpMatomo\Admin\TrackingSettings; |
| 17 | use WpMatomo\Settings; |
| 18 | |
| 19 | if ( ! defined( 'ABSPATH' ) ) { |
| 20 | exit; |
| 21 | } |
| 22 | |
| 23 | /** |
| 24 | * @var string $matomo_wp_statistics_version |
| 25 | * @var bool $matomo_is_compatible_with_wp_statistics |
| 26 | */ |
| 27 | ?> |
| 28 | |
| 29 | |
| 30 | <?php |
| 31 | if ( ! $matomo_is_compatible_with_wp_statistics ) { |
| 32 | ?> |
| 33 | <div class="notice notice-warning is-dismissible"> |
| 34 | <p> |
| 35 | <?php |
| 36 | echo esc_html( |
| 37 | sprintf( __( 'The currently installed WP Statistics version (%1$s) is too old. Please update to the latest version before running the importer.', 'matomo' ), $matomo_wp_statistics_version ) |
| 38 | ); |
| 39 | ?> |
| 40 | </p> |
| 41 | </div> |
| 42 | <?php |
| 43 | } |
| 44 | ?> |
| 45 | |
| 46 | <h2>1. <?php esc_html_e( 'Install the WP-CLI', 'matomo' ); ?></h2> |
| 47 | |
| 48 | <?php echo sprintf( esc_html__( 'The WP-CLI is the official WordPress client command line tool. Follow these installation instructions: %s.', 'matomo' ), '<a href="https://wp-cli.org/#installing" rel="noreferrer noopener" target="_blank">here</a>' ); ?> |
| 49 | |
| 50 | <h2>2. <?php esc_html_e( 'Run the import', 'matomo' ); ?></h2> |
| 51 | |
| 52 | <?php echo sprintf( esc_html__( 'Run the command %1$s or depending on your set-up you may need to run it like this: %2$s.', 'matomo' ), '<code>php wp-cli.phar matomo importWpStatistics</code>', '<code>wp matomo importWpStatistics</code>' ); ?> |
| 53 | |
| 54 | <h2>3. <?php esc_html_e( 'Done', 'matomo' ); ?></h2> |
| 55 | <p> |
| 56 | <?php esc_html_e( 'The data will now show up in your Matomo Summary page and Matomo Reporting. Please note that the "Visits Log" feature won\'t show any data, as we only import aggregated reports.', 'matomo' ); ?> |
| 57 | <br/> |
| 58 | <br/> |
| 59 | This page will disappear when the WP Statistics plugin is deactivated.<br/> |
| 60 | <br/> |
| 61 | </p> |
| 62 | |
| 63 | <?php |
| 64 | $show_troubleshooting_link = false; |
| 65 | require 'info_help.php'; |
| 66 | ?> |
| 67 |