access.php
2 years ago
advanced_settings.php
2 years ago
exclusion_settings.php
4 years ago
geolocation_settings.php
2 years ago
get_started.php
4 years ago
import_wp_statistics.php
4 years ago
info.php
4 years ago
info_bug_report.php
2 years ago
info_help.php
4 years ago
info_high_traffic.php
2 years ago
info_multisite.php
2 years ago
info_newsletter.php
4 years ago
info_shared.php
4 years ago
marketplace.php
2 years ago
marketplace_setup_wizard.php
2 years ago
measurable_settings.php
2 years ago
privacy_gdpr.php
4 years ago
scheduled_tasks_failures.php
2 years ago
settings.php
4 years ago
settings_errors.php
4 years ago
summary.php
4 years ago
systemreport.php
2 years ago
tracking.php
3 years ago
update_notice_clear_cache.php
5 years ago
marketplace_setup_wizard.php
185 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 | if ( ! defined( 'ABSPATH' ) ) { |
| 11 | exit; |
| 12 | } |
| 13 | ?> |
| 14 | <style> |
| 15 | .matomo-marketplace-wizard { |
| 16 | width: 100%; |
| 17 | max-width: 700px; |
| 18 | background-color: white; |
| 19 | box-shadow: 0 1px 2px rgba(0,0,0,.3); |
| 20 | border-radius: 3px; |
| 21 | padding-top: 48px; |
| 22 | position: relative; |
| 23 | margin: 32px auto 0 auto; |
| 24 | } |
| 25 | |
| 26 | .matomo-marketplace-wizard-header { |
| 27 | position: absolute; |
| 28 | border-top-left-radius: 3px; |
| 29 | border-top-right-radius: 3px; |
| 30 | top: 0; |
| 31 | left: 0; |
| 32 | right: 0; |
| 33 | height: 48px; |
| 34 | background-color: #e9e9e9; |
| 35 | } |
| 36 | |
| 37 | .matomo-marketplace-wizard-logo { |
| 38 | top: -14px; |
| 39 | left: calc(50% - 38px); |
| 40 | position: absolute; |
| 41 | border-radius: 50%; |
| 42 | background-color: white; |
| 43 | width: 72px; |
| 44 | height: 72px; |
| 45 | display: flex; |
| 46 | align-items: center; |
| 47 | justify-content: center; |
| 48 | border: 2px solid #ccc; |
| 49 | } |
| 50 | |
| 51 | .matomo-marketplace-wizard-body { |
| 52 | padding: 24px; |
| 53 | } |
| 54 | |
| 55 | .matomo-marketplace-wizard-logo img { |
| 56 | width: 64px; |
| 57 | } |
| 58 | |
| 59 | .matomo-marketplace-wizard .wizard-steps-header { |
| 60 | display: flex; |
| 61 | flex-direction: row; |
| 62 | align-items: flex-start; |
| 63 | } |
| 64 | |
| 65 | .matomo-marketplace-wizard .wizard-steps-header .step-title { |
| 66 | text-transform: uppercase; |
| 67 | flex: 1; |
| 68 | color: #888; |
| 69 | } |
| 70 | |
| 71 | .matomo-marketplace-wizard .wizard-steps-header .divider { |
| 72 | width: 33px; |
| 73 | } |
| 74 | |
| 75 | .matomo-marketplace-wizard .wizard-steps { |
| 76 | display: flex; |
| 77 | flex-direction: row; |
| 78 | align-items: stretch; |
| 79 | } |
| 80 | |
| 81 | .matomo-marketplace-wizard .wizard-steps .step { |
| 82 | flex: 1; |
| 83 | padding-right: 32px; |
| 84 | display: flex; |
| 85 | flex-direction: column; |
| 86 | justify-content: space-between; |
| 87 | align-items: flex-start; |
| 88 | padding-bottom: 6px; |
| 89 | } |
| 90 | |
| 91 | .matomo-marketplace-wizard .wizard-steps .divider { |
| 92 | width: 1px; |
| 93 | background-color: #aaa; |
| 94 | margin: 0 16px; |
| 95 | } |
| 96 | |
| 97 | .matomo-marketplace-wizard .wizard-footer p{ |
| 98 | font-size: 0.9em; |
| 99 | margin-top: 24px; |
| 100 | } |
| 101 | </style> |
| 102 | <div class="matomo-marketplace-wizard" data-current-step="0"> |
| 103 | <div class="matomo-marketplace-wizard-header"> |
| 104 | <div class="matomo-marketplace-wizard-logo"> |
| 105 | <img alt="Matomo Logo" src="<?php echo esc_attr( $matomo_logo_big ); ?>" /> |
| 106 | </div> |
| 107 | </div> |
| 108 | |
| 109 | <div class="matomo-marketplace-wizard-body"> |
| 110 | <?php if ( $user_can_upload_plugins && ! $is_plugin_installed ) { ?> |
| 111 | <h1><?php esc_html_e( 'Setup the Matomo Marketplace in two easy steps', 'matomo' ); ?></h1> |
| 112 | |
| 113 | <div class="wizard-steps-header"> |
| 114 | <p class="step-title">Step 1</p> |
| 115 | <div class="divider"></div> |
| 116 | <p class="step-title">Step 2</p> |
| 117 | </div> |
| 118 | <div class="wizard-steps"> |
| 119 | <div class="step"> |
| 120 | |
| 121 | <p><?php echo sprintf( esc_html__( 'Download the %1$sMatomo Marketplace for WordPress%2$s plugin.', 'matomo' ), '<em>', '</em>' ); ?></p> |
| 122 | |
| 123 | <a class="button-primary download-plugin" rel="noreferrer noopener" target="_blank" href="http://builds.matomo.org/matomo-marketplace-for-wordpress-latest.zip"> |
| 124 | <?php esc_html_e( 'Download', 'matomo' ); ?> |
| 125 | </a> |
| 126 | </div> |
| 127 | |
| 128 | <div class="divider"></div> |
| 129 | |
| 130 | <div class="step"> |
| 131 | <p><?php esc_html_e( 'Upload and install the plugin.', 'matomo' ); ?></p> |
| 132 | |
| 133 | <a class="button-primary open-plugin-upload" target="_blank" href="plugin-install.php?tab=upload"> |
| 134 | <?php esc_html_e( 'Go to plugins admin', 'matomo' ); ?> → |
| 135 | </a> |
| 136 | </div> |
| 137 | </div> |
| 138 | <div class="wizard-footer"> |
| 139 | <p><em> |
| 140 | <?php |
| 141 | echo sprintf( |
| 142 | esc_html__( 'Don\'t want to use the Matomo Marketplace? You can download Matomo plugins directly on %1$sour marketplace%2$s, but keep in mind, you won\'t receive automatic updates unless you use the Matomo Marketplace plugin.', 'matomo' ), |
| 143 | '<a target="_blank" rel="noreferrer noopener" href="https://plugins.matomo.org/?wp=1">', |
| 144 | '</a>' |
| 145 | ); |
| 146 | ?> |
| 147 | </em></p> |
| 148 | <p class="wizard-waiting-for" style="display:none;"> |
| 149 | <strong><?php esc_html_e( 'Waiting for plugin activation...', 'matomo' ); ?></strong> |
| 150 | </p> |
| 151 | <p class="wizard-reloading" style="display:none;"> |
| 152 | <strong><?php esc_html_e( 'Loading marketplace...', 'matomo' ); ?></strong> |
| 153 | </p> |
| 154 | </div> |
| 155 | <?php } elseif ( $user_can_activate_plugins && $is_plugin_installed ) { ?> |
| 156 | <h1><?php esc_html_e( 'Activate the Matomo Marketplace for WordPress plugin', 'matomo' ); ?></h1> |
| 157 | |
| 158 | <p><?php esc_html_e( 'The Matomo Marketplace plugin is installed but not active. Activate it by clicking the button below.', 'matomo' ); ?></p> |
| 159 | |
| 160 | <p> |
| 161 | <a class="button-primary activate-plugin" rel="noreferrer noopener" href=""> |
| 162 | <?php esc_html_e( 'Activate', 'matomo' ); ?> |
| 163 | </a> |
| 164 | </p> |
| 165 | <p class="wizard-waiting-for" style="display:none;"> |
| 166 | <?php esc_html_e( 'Waiting for plugin activation...', 'matomo' ); ?> |
| 167 | </p> |
| 168 | <p class="wizard-reloading" style="display:none;"> |
| 169 | <?php esc_html_e( 'Loading marketplace...', 'matomo' ); ?> |
| 170 | </p> |
| 171 | <?php } else { ?> |
| 172 | <p> |
| 173 | <?php |
| 174 | echo sprintf( |
| 175 | esc_html__( 'To manage Matomo plugins from the Matomo Marketplace, the %1$sMatomo Marketplace for WordPress%2$s must be installed.', 'matomo' ), |
| 176 | '<a href="https://matomo.org/faq/wordpress/how-do-i-install-a-matomo-marketplace-plugin-in-matomo-for-wordpress/" target="_blank" rel="noreferrer noopener">', |
| 177 | '</a>' |
| 178 | ); |
| 179 | ?> |
| 180 | </p> |
| 181 | <p><?php esc_html_e( 'Unfortunately, you do not appear to have the ability to upload plugin archives. Please ask your WordPress site administrator to complete this setup for you.', 'matomo' ); ?></p> |
| 182 | <?php } ?> |
| 183 | </div> |
| 184 | </div> |
| 185 |