Skip to content

Commit 396db53

Browse files
committed
1.2.11
* [tested] with WordPress 6.8 * [change] Dashboard tweaks * [update] Action links
1 parent 809daa5 commit 396db53

File tree

8 files changed

+188
-77
lines changed

8 files changed

+188
-77
lines changed

ajdg-matomo-tracker-dashboard.php

Lines changed: 47 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
<h2 class="ajdg-postbox-title"><?php _e('Settings', 'ajdg-matomo-tracker'); ?></h2>
3131
<div id="report-form" class="ajdg-postbox-content">
3232

33-
<form name="report" id="post" method="post" action="tools.php?page=matomo-tracker">
33+
<form name="report" id="post" method="post" action="tools.php?page=ajdg-matomo-tracker">
3434
<?php wp_nonce_field('matomo_nonce','matomo_nonce'); ?>
3535

3636
<h2><?php _e('Required options', 'ajdg-matomo-tracker'); ?></h2>
@@ -96,17 +96,54 @@
9696
<div id="right-column" class="ajdg-postbox-container">
9797

9898
<div class="ajdg-postbox">
99-
<h2 class="ajdg-postbox-title"><?php _e('Support & News', 'ajdg-matomo-tracker'); ?></h2>
100-
<div id="stats" class="ajdg-postbox-content">
101-
<h2><?php _e('Help with development', 'ajdg-matomo-tracker'); ?></h2>
102-
<p><?php _e('AJdG Matomo Tracker is developed independently from Matomo and Arnan is not affiliated with Matomo or their team. Developing plugins like this, however small, takes a lot of time and resources. If you like AJdG Matomo Tracker or you find it useful please consider making a donation. Thanks for your support!', 'ajdg-matomo-tracker'); ?></p>
103-
<p><a class="button-primary" href="https://arnan.me/donate.html" target="_blank"><?php _e('Donate via Paypal', 'ajdg-matomo-tracker'); ?></a> <a class="button-secondary" href="https://wordpress.org/support/plugin/matomo-analytics/reviews?rate=5#postform" target="_blank"><?php _e('Write review on wordpress.org', 'ajdg-matomo-tracker'); ?></a> <a class="button-secondary" href="https://support.ajdg.net/" target="_blank"><?php _e('Support', 'ajdg-matomo-tracker'); ?></a></p>
99+
<h2 class="ajdg-postbox-title"><?php _e('Matomo Tracker', 'ajdg-matomo-tracker'); ?></h2>
100+
<div id="general" class="ajdg-postbox-content">
101+
<p><strong><?php _e('Get help with Matomo Tracker', 'ajdg-matomo-tracker'); ?></strong></p>
102+
<p><?php _e('Use the buttons below if you have any questions about using Matomo Tracker. I am always happy to help!', 'ajdg-matomo-tracker'); ?></p>
103+
104+
<p><a class="button-primary" href="https://ajdg.solutions/product/support-ticket/" target="_blank" title="<?php _e('Buy support ticket', 'ajdg-matomo-tracker'); ?>"><?php _e('Buy a support ticket', 'ajdg-matomo-tracker'); ?></a> <a class="button-primary" href="https://support.ajdg.net/knowledgebase.php" target="_blank" title="<?php _e('Knowledgebase', 'ajdg-matomo-tracker'); ?>"><?php _e('Knowledgebase', 'ajdg-matomo-tracker'); ?></a> <a class="button-secondary" href="https://wordpress.org/support/plugin/matomo-analytics/" target="_blank" title="<?php _e('Forum on wordpress.org', 'ajdg-matomo-tracker'); ?>"><?php _e('Forum on wordpress.org', 'ajdg-matomo-tracker'); ?></a></p>
105+
106+
<p><strong><?php _e('Support Matomo Tracker', 'ajdg-matomo-tracker'); ?></strong></p>
107+
<p><?php _e('Consider writing a review or making a donation if you like the plugin or if you find the plugin useful. Thanks for your support!', 'ajdg-matomo-tracker'); ?></p>
108+
109+
<p><a class="button-primary" href="https://ajdg.solutions/product/token-of-thanks/" target="_blank" title="<?php _e('Support me with a token of thanks', 'ajdg-matomo-tracker'); ?>"><?php _e('Gift a token of thanks', 'ajdg-matomo-tracker'); ?></a> <a class="button-secondary" href="https://wordpress.org/support/plugin/matomo-analytics/reviews?rate=5#postform" target="_blank" title="<?php _e('Write review on wordpress.org', 'ajdg-matomo-tracker'); ?>"><?php _e('Write review on wordpress.org', 'ajdg-matomo-tracker'); ?></a></p>
110+
111+
<p><strong><?php _e('Plugins and services', 'ajdg-matomo-tracker'); ?></strong></p>
112+
<table width="100%">
113+
<tr>
114+
<td width="50%">
115+
<div class="ajdg-sales-widget" style="display: inline-block; margin-right:2%;">
116+
<a href="https://ajdg.solutions/product/adrotate-pro-single/" target="_blank"><div class="header"><img src="<?php echo plugins_url("/images/offers/monetize-your-site.jpg", __FILE__); ?>" alt="AdRotate Professional" width="228" height="120"></div></a>
117+
<a href="https://ajdg.solutions/product/adrotate-pro-single/" target="_blank"><div class="title"><?php _e('AdRotate Professional', 'ajdg-matomo-tracker'); ?></div></a>
118+
<div class="sub_title"><?php _e('WordPress Plugin', 'ajdg-matomo-tracker'); ?></div>
119+
<div class="cta"><a role="button" class="cta_button" href="https://ajdg.solutions/product/adrotate-pro-single/" target="_blank">Starting at &euro; 39,-</a></div>
120+
<hr>
121+
<div class="description"><?php _e('Place any kind of advert including those from Google Adsense or affiliate links on your WordPress and ClassicPress website.', 'ajdg-matomo-tracker'); ?></div>
122+
</div>
123+
</td>
124+
<td>
125+
<div class="ajdg-sales-widget" style="display: inline-block;">
126+
<a href="https://ajdg.solutions/plugins/" target="_blank"><div class="header"><img src="<?php echo plugins_url("/images/offers/more-plugins.jpg", __FILE__); ?>" alt="AJdG Solutions Plugins" width="228" height="120"></div></a>
127+
<a href="https://ajdg.solutions/plugins/" target="_blank"><div class="title"><?php _e('All my plugins', 'ajdg-matomo-tracker'); ?></div></a>
128+
<div class="sub_title"><?php _e('WordPress and ClassicPress', 'ajdg-matomo-tracker'); ?></div>
129+
<div class="cta"><a role="button" class="cta_button" href="https://ajdg.solutions/plugins/" target="_blank">View now</a></div>
130+
<hr>
131+
<div class="description"><?php _e('Excellent plugins for WordPres, ClassicPress, WooCommerce and bbPress. Most of them are completely FREE to use!', 'ajdg-matomo-tracker'); ?></div>
132+
</div>
133+
</td>
134+
</tr>
135+
</table>
104136

105-
<h2><?php _e('News and Updates', 'ajdg-matomo-tracker'); ?></h2>
106-
<p><a href="http://ajdg.solutions/feed/" target="_blank" title="Subscribe to the AJdG Solutions RSS feed!" class="button-primary"><i class="icn-rss"></i>Subscribe via RSS feed</a> <em>No account required!</em></p>
137+
</div>
138+
</div>
139+
140+
<div class="ajdg-postbox">
141+
<h2 class="ajdg-postbox-title"><?php _e('News & Updates', 'ajdg-matomo-tracker'); ?></h2>
142+
<div id="news" class="ajdg-postbox-content">
143+
<p><a href="http://ajdg.solutions/feed/" target="_blank" title="Subscribe to the AJdG Solutions RSS feed!" class="button-primary"><i class="icn-rss"></i><?php _e('Subscribe via RSS feed', 'ajdg-matomo-tracker'); ?></a> <em><?php _e('No account required!', 'ajdg-matomo-tracker'); ?></em></p>
107144

108145
<?php wp_widget_rss_output(array(
109-
'url' => array('http://ajdg.solutions/feed/'),
146+
'url' => 'http://ajdg.solutions/feed/',
110147
'items' => 5,
111148
'show_summary' => 1,
112149
'show_author' => 0,
@@ -118,4 +155,4 @@
118155
</div>
119156
</div>
120157
</div>
121-
<center><small><?php _e('Arnan de Gans and "AJdG Matomo Tracker" are luckily not affiliated with Matomo. For support with Matomo itself check out their website.', 'ajdg-matomo-tracker'); ?></small></center>
158+
<center><small><?php _e('Arnan de Gans and "Matomo Tracker" are not affiliated with Matomo. For support with Matomo itself check out their website.', 'ajdg-matomo-tracker'); ?></small></center>

ajdg-matomo-tracker-functions.php

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ function ajdg_matomo_save_settings() {
103103
update_option('ajdg_matomo_track_feed_impressions', $track_feed_impressions);
104104
update_option('ajdg_matomo_high_accuracy', $track_high_accuracy);
105105

106-
ajdg_matomo_return('matomo-tracker', 100);
106+
ajdg_matomo_return('ajdg-matomo-tracker', 100);
107107
exit;
108108
} else {
109109
ajdg_matomo_nonce_error();
@@ -164,7 +164,7 @@ function ajdg_matomo_notifications_dashboard() {
164164
if($review_banner != 1 AND $review_banner < (current_time('timestamp') - (7 * DAY_IN_SECONDS))) {
165165
echo '<div class="ajdg-notification notice" style="">';
166166
echo ' <div class="ajdg-notification-logo" style="background-image: url(\''.plugins_url('/images/notification.png', __FILE__).'\');"><span></span></div>';
167-
echo ' <div class="ajdg-notification-message">Hey there <strong>'.$displayname.'</strong>! You have been using <strong>AJdG Matomo Tracker</strong> for a few days.<br />If you like the plugin, please <strong>write a review</strong>.<br />If you have questions, complaints or something else that does not belong in a review, please use the <a href="https://wordpress.org/support/plugin/matomo-analytics/">support forum</a>!</div>';
167+
echo ' <div class="ajdg-notification-message">Hey there <strong>'.$displayname.'</strong>! You have been using <strong>Matomo Tracker</strong> for a few days.<br />If you like the plugin, please <strong>write a review</strong>.<br />If you have questions, complaints or something else that does not belong in a review, please use the <a href="https://wordpress.org/support/plugin/matomo-analytics/">support forum</a>!</div>';
168168
echo ' <div class="ajdg-notification-cta">';
169169
echo ' <a href="https://wordpress.org/support/plugin/matomo-analytics/reviews?rate=5#postform" class="ajdg-notification-act button-primary">Write a Review</a>';
170170
echo ' <a href="tools.php?page=matomo-tracker&hide=1" class="ajdg-notification-dismiss">Maybe later</a>';
@@ -180,7 +180,7 @@ function ajdg_matomo_notifications_dashboard() {
180180
foreach($has_error as $error => $message) {
181181
echo '&raquo; '.$message.'<br />';
182182
}
183-
echo ' <br /><a href="'.admin_url('/tools.php?page=matomo-tracker').'">'.__('Check your settings', 'ajdg-matomo-tracker').'</a>!';
183+
echo ' <a href="'.admin_url('/tools.php?page=ajdg-matomo-tracker').'">'.__('Check your settings', 'ajdg-matomo-tracker').'</a>!';
184184
echo ' </div>';
185185
echo '</div>';
186186
}
@@ -195,8 +195,12 @@ function ajdg_matomo_has_error() {
195195
$siteurl = get_option('ajdg_matomo_siteurl');
196196
$track_active = get_option('ajdg_matomo_active');
197197

198-
if($track_active == 'yes' AND (empty($siteid) OR empty($siteurl))) {
199-
$error['matomo_site_details'] = __('You activated the tracker but the Site ID and/or Site URL is empty.', 'ajdg-matomo-tracker');
198+
if($track_active == 'yes' AND empty($siteid)) {
199+
$error['matomo_site_id'] = __('You activated the Matomo Analytics Tracker but the Site ID is not set.', 'ajdg-matomo-tracker');
200+
}
201+
202+
if($track_active == 'yes' AND empty($siteurl)) {
203+
$error['matomo_site_url'] = __('You activated the Matomo Analytics Tracker but the Site URL is not configured.', 'ajdg-matomo-tracker');
200204
}
201205

202206
$error = (isset($error) AND is_array($error)) ? $error : false;
@@ -209,8 +213,8 @@ function ajdg_matomo_has_error() {
209213
Since: 1.0
210214
-------------------------------------------------------------*/
211215
function ajdg_matomo_action_links($links) {
212-
$links['ajdg-matomo-settings'] = sprintf('<a href="%s">%s</a>', admin_url('tools.php?page=matomo-tracker'), 'Settings');
213-
$links['ajdg-matomo-help'] = sprintf('<a href="%s" target="_blank">%s</a>', 'https://support.ajdg.net/', 'Support');
216+
$links['ajdg-matomo-settings'] = sprintf('<a href="%s">%s</a>', admin_url('tools.php?page=ajdg-matomo-tracker'), 'Settings');
217+
$links['ajdg-matomo-help'] = sprintf('<a href="%s" target="_blank">%s</a>', 'https://support.ajdg.net/knowledgebase.php', 'Support');
214218
$links['ajdg-matomo-ajdg'] = sprintf('<a href="%s" target="_blank">%s</a>', 'https://ajdg.solutions/', 'ajdg.solutions');
215219

216220
return $links;
@@ -229,7 +233,7 @@ function ajdg_matomo_return($page, $status, $args = null) {
229233
$arguments = wp_parse_args($args, $defaults);
230234
$redirect = 'tools.php?page=' . $page . '&'.http_build_query($arguments);
231235
} else {
232-
$redirect = 'tools.php?page=matomo-tracker';
236+
$redirect = 'tools.php?page=ajdg-matomo-tracker';
233237
}
234238

235239
wp_redirect($redirect);

ajdg-matomo-tracker.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?php
22
/*
3-
Plugin Name: AJdG Matomo Tracker
3+
Plugin Name: Matomo Tracker
44
Plugin URI: https://ajdg.solutions/product/matomo-tracker-for-wordpress/
55
Author: Arnan de Gans
66
Author URI: https://www.arnan.me/
77
Description: Easily add the Matomo tracking code to your websites footer and manage options for it from the dashboard.
8-
Version: 1.2.10
8+
Version: 1.2.11
99
Text Domain: ajdg-matomo-tracker
1010
Domain Path: /languages/
1111
License: GPLv3
@@ -62,22 +62,22 @@
6262
Purpose: Add pages to admin menus
6363
-------------------------------------------------------------*/
6464
function ajdg_matomo_dashboard_menu() {
65-
add_management_page('Matomo Tracker', 'Matomo Tracker', 'manage_options', 'matomo-tracker', 'ajdg_matomo_info');
65+
add_management_page('Matomo Tracker', 'Matomo Tracker', 'manage_options', 'ajdg-matomo-tracker', 'ajdg_matomo_dashboard');
6666
}
6767

6868
/*-------------------------------------------------------------
69-
Name: ajdg_matomo_info
69+
Name: ajdg_matomo_dashboard
7070
Purpose: Admin general info page
7171
-------------------------------------------------------------*/
72-
function ajdg_matomo_info() {
73-
$status = $do = '';
72+
function ajdg_matomo_dashboard() {
73+
$status = '';
7474
if(isset($_GET['status'])) $status = esc_attr($_GET['status']);
7575

7676
$current_user = wp_get_current_user();
7777
?>
7878

7979
<div class="wrap">
80-
<h1><?php _e('AJdG Matomo Tracker', 'ajdg-matomo-tracker'); ?></h1>
80+
<h1><?php _e('Matomo Tracker', 'ajdg-matomo-tracker'); ?></h1>
8181

8282
<?php
8383
if($status > 0) ajdg_matomo_status($status);

images/offers/index.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?php
2+
// Nope.
3+
?>
9.54 KB
Loading

images/offers/more-plugins.jpg

10.8 KB
Loading

0 commit comments

Comments
 (0)