access.php
7 months ago
adblocker-notice.php
2 months ago
advanced_settings.php
10 months ago
exclusion_settings.php
4 years ago
geolocation_settings.php
2 months ago
get_started.php
3 months ago
import_wp_statistics.php
2 months ago
info.php
3 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
3 months ago
info_newsletter.php
2 months ago
info_shared.php
1 year ago
marketplace.php
1 month ago
marketplace_setup_wizard.php
3 months ago
marketplace_setup_wizard_body.php
1 month ago
measurable_settings.php
2 years ago
privacy_gdpr.php
4 years ago
scheduled_tasks_failures.php
2 months 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
2 months ago
whats-new-notifications.php
2 months ago
marketplace.php
172 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 | use WpMatomo\Admin\Marketplace\PopularFeatures; |
| 11 | |
| 12 | if ( ! defined( 'ABSPATH' ) ) { |
| 13 | exit; |
| 14 | } |
| 15 | |
| 16 | /** @var \WpMatomo\Settings $settings */ |
| 17 | $matomo_extra_url_params = '&' . http_build_query( |
| 18 | [ |
| 19 | 'php' => PHP_MAJOR_VERSION . '.' . PHP_MINOR_VERSION . '.' . PHP_RELEASE_VERSION, |
| 20 | 'matomo' => $settings->get_global_option( 'core_version' ), |
| 21 | 'wp_version' => ! empty( $GLOBALS['wp_version'] ) ? $GLOBALS['wp_version'] : '', |
| 22 | ] |
| 23 | ); |
| 24 | |
| 25 | /** @var string $matomo_currency */ |
| 26 | /** @var string $matomo_marketplace_url */ |
| 27 | ?> |
| 28 | <?php if ( ! empty( $valid_tabs ) ) { ?> |
| 29 | <h2 class="nav-tab-wrapper" style="margin-bottom:1em;"> |
| 30 | <?php if ( in_array( 'marketplace', $valid_tabs, true ) ) { ?> |
| 31 | <a href="?page=matomo-marketplace&tab=marketplace" |
| 32 | class="nav-tab <?php echo ( 'marketplace' === $active_tab ) ? 'nav-tab-active' : ''; ?>" |
| 33 | ><?php esc_html_e( 'Welcome', 'matomo' ); ?></a> |
| 34 | <?php } ?> |
| 35 | <?php if ( in_array( 'install', $valid_tabs, true ) ) { ?> |
| 36 | <a href="?page=matomo-marketplace&tab=install" |
| 37 | class="nav-tab <?php echo ( 'install' === $active_tab ) ? 'nav-tab-active' : ''; ?>" |
| 38 | ><?php esc_html_e( 'Marketplace', 'matomo' ); ?></a> |
| 39 | <?php } ?> |
| 40 | <?php if ( in_array( 'subscriptions', $valid_tabs, true ) ) { ?> |
| 41 | <a href="?page=matomo-marketplace&tab=subscriptions" |
| 42 | class="nav-tab <?php echo 'subscriptions' === $active_tab ? 'nav-tab-active' : ''; ?>"><?php esc_html_e( 'Subscriptions', 'matomo' ); ?></a> |
| 43 | <?php } ?> |
| 44 | </h2> |
| 45 | <?php } ?> |
| 46 | |
| 47 | <?php if ( $settings->is_network_enabled() && ! is_network_admin() && is_super_admin() ) { ?> |
| 48 | <div class="matomo-notice updated notice"> |
| 49 | <p><?php esc_html_e( 'Only WordPress network admins can see this page', 'matomo' ); ?></p> |
| 50 | </div> |
| 51 | <?php } ?> |
| 52 | |
| 53 | <?php |
| 54 | if ( isset( $marketplace_setup_wizard ) && 'marketplace' !== $active_tab ) { |
| 55 | $marketplace_setup_wizard->show(); |
| 56 | return; |
| 57 | } |
| 58 | ?> |
| 59 | |
| 60 | <script> |
| 61 | window.jQuery(document).ready(function ($) { |
| 62 | $('body').on('click', '.download-plugin', function (e) { |
| 63 | if ($(e.target).is('.button-secondary')) { |
| 64 | return; |
| 65 | } |
| 66 | |
| 67 | var step = $(e.target).closest('#matomo-step1'); |
| 68 | step.find('.step-number').removeClass('current').removeClass('matomo-primary-color-bg'); |
| 69 | step.find('.button-primary').removeClass('button-primary').addClass('button-secondary'); |
| 70 | |
| 71 | var step2 = step.siblings('#matomo-step2'); |
| 72 | step2.find('.step-number').addClass('current').addClass('matomo-primary-color-bg'); |
| 73 | step2.find('.button-secondary').removeClass('button-secondary').addClass('button-primary'); |
| 74 | }); |
| 75 | }); |
| 76 | </script> |
| 77 | <div id="matomo-for-marketplace-welcome"> |
| 78 | <h1><?php matomo_header_icon(); ?><?php esc_html_e( 'What is the Matomo for WordPress Marketplace', 'matomo' ); ?></h1> |
| 79 | |
| 80 | <p> |
| 81 | <?php esc_html_e( 'Matomo for WordPress includes core analytics to understand your visitors, behaviour, acquisition and ecommerce performance.', 'matomo' ); ?> |
| 82 | </p> |
| 83 | <p> |
| 84 | <?php esc_html_e( 'As your needs grow, you can extend your analytics with additional Matomo features.', 'matomo' ); ?> |
| 85 | </p> |
| 86 | <p> |
| 87 | <?php esc_html_e( 'The Marketplace lets you discover and install these features directly in Matomo for WordPress, so you can unlock more advanced insights when you need them.', 'matomo' ); ?> |
| 88 | </p> |
| 89 | |
| 90 | <div id="matomo-welcome-marketplace-setup" class="matomo-marketplace-wizard-body"> |
| 91 | <div id="matomo-setup-preface"> |
| 92 | <div id="matomo-setup-preface-title"> |
| 93 | <img src="<?php echo esc_attr( plugins_url( '/assets/img/logo.png', MATOMO_ANALYTICS_FILE ) ); ?>" alt="Matomo Logo" /> |
| 94 | <h2> |
| 95 | <?php esc_html_e( 'Setup the Matomo Marketplace in two easy steps', 'matomo' ); ?> |
| 96 | </h2> |
| 97 | </div> |
| 98 | <p> |
| 99 | <?php esc_html_e( 'Discover more than 100 advanced analytics features built by Matomo and its community.', 'matomo' ); ?> |
| 100 | </p> |
| 101 | <p> |
| 102 | <?php esc_html_e( 'Install and manage these features directly in Matomo for WordPress to extend your analytics as your needs grow.', 'matomo' ); ?> |
| 103 | </p> |
| 104 | <p> |
| 105 | <?php esc_html_e( 'Follow these steps to install the Marketplace and start unlocking additional capabilities.', 'matomo' ); ?> |
| 106 | </p> |
| 107 | |
| 108 | <div class="matomo-setup-divider"></div> |
| 109 | <p class="matomo-smaller-text"> |
| 110 | <?php |
| 111 | echo sprintf( |
| 112 | esc_html__( 'Don\'t want to use the plugin? Download directly %1$son our marketplace,%2$s but keep in mind, you won\'t receive automatic updates unless you use the Matomo Marketplace plugin.', 'matomo' ), |
| 113 | '<a href="https://plugins.matomo.org/?wp=1" target="_blank" rel="noreferrer noopener">', |
| 114 | '</a>' |
| 115 | ); |
| 116 | ?> |
| 117 | </p> |
| 118 | <div> |
| 119 | <div class="wizard-waiting-for matomo-primary-color-fg"> |
| 120 | <svg class="matomo-primary-color-fill" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M10.72,19.9a8,8,0,0,1-6.5-9.79A7.77,7.77,0,0,1,10.4,4.16a8,8,0,0,1,9.49,6.52A1.54,1.54,0,0,0,21.38,12h.13a1.37,1.37,0,0,0,1.38-1.54,11,11,0,1,0-12.7,12.39A1.54,1.54,0,0,0,12,21.34h0A1.47,1.47,0,0,0,10.72,19.9Z"></path></svg> |
| 121 | <span class="waiting-for-install" style="display: none;"> |
| 122 | <?php esc_html_e( 'Waiting for plugin installation', 'matomo' ); ?>... |
| 123 | </span> |
| 124 | <span class="waiting-for-activation" style="display: none;"> |
| 125 | <?php esc_html_e( 'Waiting for plugin activation', 'matomo' ); ?>... |
| 126 | </span> |
| 127 | <span class="wizard-reloading" style="display: none;"> |
| 128 | <?php esc_html_e( 'Reloading page', 'matomo' ); ?>... |
| 129 | </span> |
| 130 | </div> |
| 131 | </div> |
| 132 | </div> |
| 133 | <div class="matomo-steps"> |
| 134 | <div id="matomo-step1" class="matomo-step"> |
| 135 | <div> |
| 136 | <span class="step-number current matomo-primary-color-bg">1</span> |
| 137 | <span><?php esc_html_e( 'Download Plugin', 'matomo' ); ?></span> |
| 138 | </div> |
| 139 | <p> |
| 140 | <?php esc_html_e( 'Download the Matomo Marketplace for WordPress plugin as a .zip file to your computer.', 'matomo' ); ?> |
| 141 | </p> |
| 142 | <div> |
| 143 | <a href="<?php echo esc_attr( $matomo_marketplace_url ); ?>" rel="noreferrer noopener" class="download-plugin"> |
| 144 | <button class="button-primary"><?php esc_html_e( 'Download .zip', 'matomo' ); ?></button> |
| 145 | </a> |
| 146 | </div> |
| 147 | </div> |
| 148 | <div id="matomo-step2" class="matomo-step"> |
| 149 | <div> |
| 150 | <span class="step-number">2</span> |
| 151 | <span><?php esc_html_e( 'Upload & Install', 'matomo' ); ?></span> |
| 152 | </div> |
| 153 | <p> |
| 154 | <?php esc_html_e( 'Go to your WordPress plugins admin page. Upload and install the plugin you just downloaded.', 'matomo' ); ?> |
| 155 | </p> |
| 156 | <div> |
| 157 | <a class="open-plugin-upload button-secondary" href="plugin-install.php?tab=upload&mtm_marketplace_install=1" target="_blank"> |
| 158 | <?php esc_html_e( 'Go to Plugins', 'matomo' ); ?> |
| 159 | </a> |
| 160 | </div> |
| 161 | </div> |
| 162 | </div> |
| 163 | </div> |
| 164 | |
| 165 | <h1 style="margin-top: 1em;"><?php esc_html_e( 'Most popular features', 'matomo' ); ?></h1> |
| 166 | <p style="margin-bottom: 20px;"><?php esc_html_e( 'Developed by Matomo and partners, install these on top of your Matomo plugin for more advanced analytics.', 'matomo' ); ?></p> |
| 167 | |
| 168 | <?php |
| 169 | ( new PopularFeatures() )->show(); |
| 170 | ?> |
| 171 | </div> |
| 172 |