PluginProbe ʕ •ᴥ•ʔ
Matomo Analytics – Powerful, Privacy-First Insights for WordPress / 4.14.2
Matomo Analytics – Powerful, Privacy-First Insights for WordPress v4.14.2
5.11.1 5.11.0 5.10.2 5.10.1 trunk 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.1.0 1.1.1 1.1.2 1.1.3 1.2.0 1.3.0 1.3.1 1.3.2 4.0.0 4.0.1 4.0.2 4.0.3 4.0.4 4.1.0 4.1.1 4.1.2 4.1.3 4.10.0 4.11.0 4.12.0 4.13.0 4.13.2 4.13.3 4.13.4 4.13.5 4.14.0 4.14.1 4.14.2 4.15.0 4.15.1 4.15.2 4.15.3 4.2.0 4.3.0 4.3.1 4.4.1 4.4.2 4.5.0 4.6.0 5.0.1 5.0.2 5.0.3 5.0.4 5.0.5 5.0.6 5.0.7 5.0.8 5.1.0 5.1.1 5.1.2 5.1.3 5.1.4 5.1.5 5.1.6 5.1.7 5.10.0 5.2.0 5.2.1 5.2.2 5.3.0 5.3.1 5.3.2 5.3.3 5.6.0 5.6.1 5.7.0 5.7.1 5.8.0 5.8.1 5.8.2
matomo / classes / WpMatomo / Admin / views / advanced_settings.php
matomo / classes / WpMatomo / Admin / views Last commit date
access.php 4 years ago advanced_settings.php 4 years ago exclusion_settings.php 4 years ago geolocation_settings.php 4 years ago get_started.php 4 years ago import_wp_statistics.php 4 years ago info.php 4 years ago info_bug_report.php 4 years ago info_help.php 4 years ago info_high_traffic.php 4 years ago info_multisite.php 4 years ago info_newsletter.php 4 years ago info_shared.php 4 years ago marketplace.php 4 years ago privacy_gdpr.php 4 years ago settings.php 4 years ago settings_errors.php 4 years ago summary.php 4 years ago systemreport.php 3 years ago tracking.php 3 years ago update_notice_clear_cache.php 5 years ago
advanced_settings.php
84 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 * Code Based on
9 * @author Andr&eacute; Br&auml;kling
10 * https://github.com/braekling/WP-Matomo
11 *
12 */
13 /**
14 * phpcs consider all our variables as global and want them prefixed with matomo
15 * phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound
16 */
17 use WpMatomo\Admin\AdvancedSettings;
18
19 if ( ! defined( 'ABSPATH' ) ) {
20 exit;
21 }
22 /** @var bool $was_updated */
23 /** @var string $matomo_detected_ip */
24 /** @var array $matomo_client_headers */
25 ?>
26
27 <?php
28 if ( $was_updated ) {
29 include 'update_notice_clear_cache.php';
30 }
31 ?>
32 <form method="post">
33 <?php wp_nonce_field( AdvancedSettings::NONCE_NAME ); ?>
34
35 <p><?php esc_html_e( 'Advanced settings', 'matomo' ); ?></p>
36 <table class="matomo-tracking-form widefat">
37 <tbody>
38 <tr>
39 <th width="20%" scope="row"><label
40 for="matomo[proxy_client_header]"><?php esc_html_e( 'Proxy IP headers', 'matomo' ); ?>:</label>
41 </th>
42 <td>
43 <?php
44 echo '<span style="white-space: nowrap;display: inline-block;"><input type="radio" ' . ( empty( $matomo_client_headers ) ? 'checked="checked" ' : '' ) . ' value="REMOTE_ADDR" name="matomo[proxy_client_header]" /> <code>REMOTE_ADDR</code> ' . ( ! empty( $_SERVER['REMOTE_ADDR'] ) ? esc_html( sanitize_text_field( wp_unslash( $_SERVER['REMOTE_ADDR'] ) ) ) : esc_html__( 'No value found', 'matomo' ) ) . ' (' . esc_html__( 'Default', 'matomo' ) . ')</span>';
45 foreach ( AdvancedSettings::$valid_host_headers as $host_header ) {
46 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
47 echo '<span style="white-space: nowrap;display: inline-block;"><input type="radio" ' . ( in_array( $host_header, $matomo_client_headers, true ) ? 'checked="checked" ' : '' ) . 'value="' . esc_attr( $host_header ) . '" name="matomo[proxy_client_header]" /> <code>' . esc_html( $host_header ) . '</code> ' . ( ! empty( $_SERVER[ $host_header ] ) ? ( '<strong>' . esc_html( sanitize_text_field( wp_unslash( $_SERVER[ $host_header ] ) ) ) . '</strong>' ) : esc_html__( 'No value found', 'matomo' ) ) . ' &nbsp; </span>';
48 }
49 ?>
50 </td>
51 <td width="50%">
52 <?php esc_html_e( 'We detected you have the following IP address:', 'matomo' ); ?>
53 <?php echo esc_html( $matomo_detected_ip ); ?> <br>
54 <?php echo sprintf( esc_html__( 'To compare this value with your actual IP address %1$splease click here%2$s.', 'matomo' ), '<a rel="noreferrer noopener" target="_blank" href="https://matomo.org/ip.php">', '</a>' ); ?>
55 <br><br>
56 <?php esc_html_e( 'Should your IP address not match the above value, your WordPress might be behind a proxy and you may need to select a different HTTP header depending on which of the values on the left shows your correct IP address.', 'matomo' ); ?>
57 </td>
58 </tr>
59 <?php if ( ! defined( 'MATOMO_REMOVE_ALL_DATA' ) ) { ?>
60 <tr>
61 <th width="20%" scope="row"><label
62 for="matomo[delete_all_data]"><?php esc_html_e( 'Delete all data on uninstall', 'matomo' ); ?>
63 :</label>
64 </th>
65 <td>
66 <?php
67 echo '<span style="white-space: nowrap;display: inline-block;"><input type="checkbox" ' . ( ! empty( $matomo_delete_all_data ) ? 'checked="checked" ' : '' ) . ' value="1" name="matomo[delete_all_data]" /> ' . esc_html__( 'Yes', 'matomo' ) . '</span>';
68 ?>
69 </td>
70 <td width="50%">
71 <?php esc_html_e( 'By default, when you uninstall the Matomo plugin, all data is deleted and cannot be restored unless you have backups. When you disable this feature, the tracked data in the database will be kept. This can be useful to prevent accidental deletion of all your historical analytics data when you uninstall the plugin.', 'matomo' ); ?> <a
72 href="https://matomo.org/faq/wordpress/how-do-i-delete-or-reset-the-matomo-for-wordpress-data-completely/"
73 target="_blank" rel="noreferrer noopener"><?php esc_html_e( 'Learn more', 'matomo' ); ?></a>
74 </td>
75 </tr>
76 <?php } ?>
77 <tr>
78 <td colspan="3"><p class="submit"><input name="Submit" type="submit" class="button-primary"
79 value="<?php esc_attr_e( 'Save Changes', 'matomo' ); ?>"/></p></td>
80 </tr>
81 </tbody>
82 </table>
83 </form>
84