PluginProbe ʕ •ᴥ•ʔ
Matomo Analytics – Powerful, Privacy-First Insights for WordPress / 5.0.7
Matomo Analytics – Powerful, Privacy-First Insights for WordPress v5.0.7
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 / access.php
matomo / classes / WpMatomo / Admin / views Last commit date
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
access.php
111 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 if ( ! defined( 'ABSPATH' ) ) {
10 exit;
11 }
12
13 use WpMatomo\Access;
14 use WpMatomo\Admin\AccessSettings;
15 use WpMatomo\Capabilities;
16 use WpMatomo\Roles;
17
18 /** @var Access $access */
19 /** @var Roles $roles */
20 /** @var Capabilities $capabilites */
21 ?>
22
23 <p><?php esc_html_e( 'Manage which roles can view and manage your reporting data.', 'matomo' ); ?></p>
24
25 <form method="post">
26 <?php wp_nonce_field( AccessSettings::NONCE_NAME ); ?>
27
28 <table class="matomo-form widefat">
29 <thead>
30 <tr>
31 <th width="30%"><?php esc_html_e( 'WordPress Role', 'matomo' ); ?></th>
32 <th><?php esc_html_e( 'Matomo Role', 'matomo' ); ?></th>
33 </tr>
34 </thead>
35 <tbody>
36 <?php
37 foreach ( $roles->get_available_roles_for_configuration() as $matomo_role_id => $matomo_role_name ) {
38 echo '<tr><td>';
39 echo esc_html( $matomo_role_name ) . '</td>';
40 echo "<td><select name='" . esc_attr( AccessSettings::FORM_NAME ) . '[' . esc_attr( $matomo_role_id ) . "]'>";
41 $matomo_value = $access->get_permission_for_role( $matomo_role_id );
42 foreach ( Access::$matomo_permissions as $matomo_permission => $matomo_display_name ) {
43 // phpcs:ignore WordPress.WP.I18n.NonSingularStringLiteralText
44 echo "<option value='" . esc_attr( $matomo_permission ) . "' " . ( $matomo_value === $matomo_permission ? 'selected' : '' ) . '>' . esc_html__( $matomo_display_name, 'matomo' ) . '</option>';
45 }
46 echo '</td></tr>';
47 }
48 ?>
49 <tr>
50 <td colspan="2"><input name="Submit" type="submit" class="button-primary"
51 value="<?php echo esc_attr__( 'Save Changes', 'matomo' ); ?>"/></td>
52 </tr>
53 </tbody>
54 </table>
55 </form>
56
57 <p>
58 <?php
59 if ( ! is_multisite() ) {
60 esc_html_e( 'A user with role administrator automatically has the super user role.', 'matomo' );
61 }
62 ?>
63 <?php esc_html_e( 'Learn about the differences between these Matomo roles:', 'matomo' ); ?>
64 <a href="https://matomo.org/faq/general/faq_70/" target="_blank"
65 rel="noopener"><?php esc_html_e( 'View', 'matomo' ); ?></a>,
66 <a href="https://matomo.org/faq/general/faq_26910/" target="_blank"
67 rel="noopener"><?php esc_html_e( 'Write', 'matomo' ); ?></a>,
68 <a href="https://matomo.org/faq/general/faq_69/" target="_blank"
69 rel="noopener"><?php esc_html_e( 'Admin', 'matomo' ); ?></a>,
70 <a href="https://matomo.org/faq/general/faq_35/" target="_blank"
71 rel="noopener"><?php esc_html_e( 'Super User', 'matomo' ); ?></a><br/>
72 <?php esc_html_e( 'Want to redirect to the home page when not logged in?', 'matomo' ); ?> <a
73 href="https://matomo.org/faq/wordpress/how-do-i-hide-my-wordpress-login-url-when-someone-accesses-a-matomo-report-directly/"
74 target="_blank" rel="noreferrer noopener"><?php esc_html_e( 'Learn more', 'matomo' ); ?></a>
75 </p>
76
77 <h2><?php esc_html_e( 'Roles', 'matomo' ); ?></h2>
78 <p>
79 <?php
80 esc_html_e(
81 'Want to give individual users access to Matomo? Create a user in your WordPress with one of these roles:',
82 'matomo'
83 )
84 ?>
85 </p>
86 <ul class="matomo-list">
87 <?php foreach ( $roles->get_matomo_roles() as $matomo_role_config ) { ?>
88 <li><?php echo esc_html( $matomo_role_config['name'] ); ?></li>
89 <?php } ?>
90 </ul>
91
92 <h2><?php esc_html_e( 'Capabilities', 'matomo' ); ?></h2>
93 <p>
94 <?php
95 esc_html_e(
96 'You can also install a WordPress plugin which lets you manage capabilities for each individual users. These are
97 the supported capabilities:',
98 'matomo'
99 )
100 ?>
101 </p>
102 <ul class="matomo-list">
103 <?php
104 foreach ( $capabilites->get_all_capabilities_sorted_by_highest_permission() as $matomo_cap_name ) {
105 ?>
106 <li><?php echo esc_html( $matomo_cap_name ); ?></li>
107 <?php
108 }
109 ?>
110 </ul>
111