Version Description
- Select default date (today or yesterday) shown on statistics page
- Bugfix: Shortcut links are shown again
- German language fixes
- Minor optical fixes (text length)
Download this release
Release Info
Developer | Braekling |
Plugin | WP-Matomo (WP-Piwik) |
Version | 0.8.5 |
Comparing to | |
See all releases |
Code changes from version 0.8.4 to 0.8.5
- dashboard/overview.php +4 -4
- languages/wp-piwik-de_DE.mo +0 -0
- languages/wp-piwik-de_DE.po +13 -4
- readme.txt +7 -1
- wp-piwik.php +28 -14
dashboard/overview.php
CHANGED
@@ -50,11 +50,11 @@
|
|
50 |
echo '<tr><td>'.__('Unique visitors', 'wp-piwik').':</td><td>'.$aryConf['data']['nb_uniq_visitors'].'</td></tr>';
|
51 |
echo '<tr><td>'.__('Page views', 'wp-piwik').':</td><td>'.$aryConf['data']['nb_actions'].' (⌀ '.$aryConf['data']['nb_actions_per_visit'].')</td></tr>';
|
52 |
echo '<tr><td>'.__('Max. page views in one visit', 'wp-piwik').':</td><td>'.$aryConf['data']['max_actions'].'</td></tr>';
|
53 |
-
echo '<tr><td>'.__('Total time spent
|
54 |
-
echo '<tr><td>'.__('
|
55 |
echo '<tr><td>'.__('Bounce count', 'wp-piwik').':</td><td>'.$aryConf['data']['bounce_count'].' ('.$aryConf['data']['bounce_rate'].')</td></tr>';
|
56 |
-
if (
|
57 |
-
echo '<tr><td>'.__('Shortcut', 'wp-piwik').':</td><td><a href="'.
|
58 |
|
59 |
/***************************************************************************/ ?>
|
60 |
</tbody>
|
50 |
echo '<tr><td>'.__('Unique visitors', 'wp-piwik').':</td><td>'.$aryConf['data']['nb_uniq_visitors'].'</td></tr>';
|
51 |
echo '<tr><td>'.__('Page views', 'wp-piwik').':</td><td>'.$aryConf['data']['nb_actions'].' (⌀ '.$aryConf['data']['nb_actions_per_visit'].')</td></tr>';
|
52 |
echo '<tr><td>'.__('Max. page views in one visit', 'wp-piwik').':</td><td>'.$aryConf['data']['max_actions'].'</td></tr>';
|
53 |
+
echo '<tr><td>'.__('Total time spent', 'wp-piwik').':</td><td>'.$strTime.'</td></tr>';
|
54 |
+
echo '<tr><td>'.__('Time/visit', 'wp-piwik').':</td><td>'.$strAvgTime.'</td></tr>';
|
55 |
echo '<tr><td>'.__('Bounce count', 'wp-piwik').':</td><td>'.$aryConf['data']['bounce_count'].' ('.$aryConf['data']['bounce_rate'].')</td></tr>';
|
56 |
+
if (self::$aryGlobalSettings['piwik_shortcut'])
|
57 |
+
echo '<tr><td>'.__('Shortcut', 'wp-piwik').':</td><td><a href="'.self::$aryGlobalSettings['piwik_url'].'">Piwik</a>'.(isset($aryConf['inline']) && $aryConf['inline']?' - <a href="?page=wp-piwik/wp-piwik.php">WP-Piwik</a>':'').'</td></tr>';
|
58 |
|
59 |
/***************************************************************************/ ?>
|
60 |
</tbody>
|
languages/wp-piwik-de_DE.mo
CHANGED
Binary file
|
languages/wp-piwik-de_DE.po
CHANGED
@@ -58,15 +58,18 @@ msgstr "Eindeutige Besucher"
|
|
58 |
|
59 |
#: dashboard/overview.php:44
|
60 |
msgid "Page views"
|
61 |
-
msgstr "Page
|
62 |
|
63 |
#: dashboard/overview.php:45
|
64 |
msgid "Max. page views in one visit"
|
65 |
msgstr "Max. Seiten/Besuch"
|
66 |
|
67 |
#: dashboard/overview.php:46
|
68 |
-
msgid "Total time spent
|
69 |
-
msgstr "
|
|
|
|
|
|
|
70 |
|
71 |
#: dashboard/overview.php:47
|
72 |
msgid "Bounce count"
|
@@ -74,7 +77,7 @@ msgstr "Absprungrate"
|
|
74 |
|
75 |
#: dashboard/overview.php:49 wp-piwik.php:563
|
76 |
msgid "Shortcut"
|
77 |
-
msgstr "
|
78 |
|
79 |
#: dashboard/pages.php:13
|
80 |
msgid "Pages"
|
@@ -365,3 +368,9 @@ msgstr "Als nächstes solltest Du eine Verbindung zu Piwik herstellen"
|
|
365 |
|
366 |
msgid "Please validate your configuration"
|
367 |
msgstr "Bitte überprüfe Deine Konfiguration"
|
|
|
|
|
|
|
|
|
|
|
|
58 |
|
59 |
#: dashboard/overview.php:44
|
60 |
msgid "Page views"
|
61 |
+
msgstr "Page Views"
|
62 |
|
63 |
#: dashboard/overview.php:45
|
64 |
msgid "Max. page views in one visit"
|
65 |
msgstr "Max. Seiten/Besuch"
|
66 |
|
67 |
#: dashboard/overview.php:46
|
68 |
+
msgid "Total time spent"
|
69 |
+
msgstr "Verbrachte Zeit"
|
70 |
+
|
71 |
+
msgid "Time/visit"
|
72 |
+
msgstr "Zeit/Besuch"
|
73 |
|
74 |
#: dashboard/overview.php:47
|
75 |
msgid "Bounce count"
|
77 |
|
78 |
#: dashboard/overview.php:49 wp-piwik.php:563
|
79 |
msgid "Shortcut"
|
80 |
+
msgstr "Shortcut"
|
81 |
|
82 |
#: dashboard/pages.php:13
|
83 |
msgid "Pages"
|
368 |
|
369 |
msgid "Please validate your configuration"
|
370 |
msgstr "Bitte überprüfe Deine Konfiguration"
|
371 |
+
|
372 |
+
msgid "Default date"
|
373 |
+
msgstr "Default-Datum"
|
374 |
+
|
375 |
+
msgid "Default date shown on statistics page."
|
376 |
+
msgstr "Default-Datum, das auf der Statistik-Seite gezeigt wird."
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Contributors: Braekling
|
4 |
Requires at least: 3.0.1
|
5 |
Tested up to: 3.1
|
6 |
-
Stable tag: 0.8.
|
7 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=6046779
|
8 |
Tags: statistics, stats, analytics, piwik, wpmu
|
9 |
|
@@ -75,6 +75,12 @@ Thank you, guys!
|
|
75 |
|
76 |
== Changelog ==
|
77 |
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
= 0.8.4 =
|
79 |
* New stats in overview box
|
80 |
* WP 3.x compability fixes (capability and deprecated function warnings)
|
3 |
Contributors: Braekling
|
4 |
Requires at least: 3.0.1
|
5 |
Tested up to: 3.1
|
6 |
+
Stable tag: 0.8.5
|
7 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=6046779
|
8 |
Tags: statistics, stats, analytics, piwik, wpmu
|
9 |
|
75 |
|
76 |
== Changelog ==
|
77 |
|
78 |
+
= 0.8.5 =
|
79 |
+
* Select default date (today or yesterday) shown on statistics page
|
80 |
+
* Bugfix: Shortcut links are shown again
|
81 |
+
* German language fixes
|
82 |
+
* Minor optical fixes (text length)
|
83 |
+
|
84 |
= 0.8.4 =
|
85 |
* New stats in overview box
|
86 |
* WP 3.x compability fixes (capability and deprecated function warnings)
|
wp-piwik.php
CHANGED
@@ -6,7 +6,7 @@ Plugin URI: http://www.braekling.de/wp-piwik-wpmu-piwik-wordpress/
|
|
6 |
|
7 |
Description: Adds Piwik stats to your dashboard menu and Piwik code to your wordpress footer.
|
8 |
|
9 |
-
Version: 0.8.
|
10 |
Author: André Bräkling
|
11 |
Author URI: http://www.braekling.de
|
12 |
|
@@ -33,8 +33,8 @@ $GLOBALS['wp-piwik_wpmu'] = false;
|
|
33 |
class wp_piwik {
|
34 |
|
35 |
private static
|
36 |
-
$intRevisionId =
|
37 |
-
$strVersion = '0.8.
|
38 |
$intDashboardID = 6,
|
39 |
$bolWPMU = false,
|
40 |
$bolOverall = false,
|
@@ -48,7 +48,8 @@ class wp_piwik {
|
|
48 |
'dashboard_widget' => false,
|
49 |
'capability_stealth' => array(),
|
50 |
'capability_read_stats' => array('administrator' => true),
|
51 |
-
'piwik_shortcut' => false
|
|
|
52 |
),
|
53 |
$arySettings = array(
|
54 |
'tracking_code' => '',
|
@@ -157,7 +158,7 @@ class wp_piwik {
|
|
157 |
'dashboard_widget' => false,
|
158 |
'capability_stealth' => get_site_option('wpmu-piwik_filter', array()),
|
159 |
'capability_read_stats' => $aryDisplayToCap,
|
160 |
-
'piwik_shortcut' => false
|
161 |
);
|
162 |
else self::$aryGlobalSettings = array(
|
163 |
'revision' => get_option('wp-piwik_revision',0),
|
@@ -168,7 +169,7 @@ class wp_piwik {
|
|
168 |
'dashboard_widget' => $aryDashboardWidgetRange[get_option('wp-piwik_dbwidget', 0)],
|
169 |
'capability_stealth' => get_option('wp-piwik_filter', array()),
|
170 |
'capability_read_stats' => $aryDisplayToCap,
|
171 |
-
'piwik_shortcut' => get_option('wp-piwik_piwiklink',false)
|
172 |
);
|
173 |
self::$arySettings = array(
|
174 |
'tracking_code' => '',
|
@@ -187,9 +188,12 @@ class wp_piwik {
|
|
187 |
foreach ($aryRemoveOptions as $strRemoveOption) {
|
188 |
delete_option($strRemoveOption);
|
189 |
if (self::$bolWPMU) delete_site_option($strRemoveOption);
|
190 |
-
}
|
191 |
-
|
192 |
-
|
|
|
|
|
|
|
193 |
// Set current revision ID
|
194 |
self::$aryGlobalSettings['revision'] = self::$intRevisionId;
|
195 |
self::$aryGlobalSettings['last_settings_update'] = time();
|
@@ -532,6 +536,8 @@ class wp_piwik {
|
|
532 |
);
|
533 |
if (isset($_GET['date']) && preg_match('/^[0-9]{8}$/', $_GET['date']) && $aryParams[0] != 'visitors')
|
534 |
$aryDashboard[$strCol][$aryParams[0]]['params']['date'] = $_GET['date'];
|
|
|
|
|
535 |
}
|
536 |
}
|
537 |
/***************************************************************************/ ?>
|
@@ -595,11 +601,12 @@ class wp_piwik {
|
|
595 |
|
596 |
function applySettings() {
|
597 |
if (!self::$bolWPMU) {
|
598 |
-
self::$aryGlobalSettings['add_tracking_code']
|
599 |
-
self::$aryGlobalSettings['dashboard_widget']
|
600 |
-
self::$aryGlobalSettings['piwik_shortcut']
|
601 |
-
self::$arySettings['site_id']
|
602 |
-
self::$arySettings['track_404']
|
|
|
603 |
}
|
604 |
self::$aryGlobalSettings['piwik_token'] = (isset($_POST['wp-piwik_token'])?$_POST['wp-piwik_token']:'');
|
605 |
self::$aryGlobalSettings['piwik_url'] = (isset($_POST['wp-piwik_url'])?$_POST['wp-piwik_url']:'');
|
@@ -741,6 +748,13 @@ class wp_piwik {
|
|
741 |
($intShowLink?' checked="checked"':"").'/></div>';
|
742 |
echo '<div class="wp-piwik_desc">'.
|
743 |
__('Display a shortcut to Piwik itself.', 'wp-piwik').'</div>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
744 |
echo '<h4><label>'.__('Display to', 'wp-piwik').':</label></h4>';
|
745 |
echo '<div class="input-wrap">';
|
746 |
$intDisplayTo = self::$aryGlobalSettings['capability_read_stats'];
|
6 |
|
7 |
Description: Adds Piwik stats to your dashboard menu and Piwik code to your wordpress footer.
|
8 |
|
9 |
+
Version: 0.8.5
|
10 |
Author: André Bräkling
|
11 |
Author URI: http://www.braekling.de
|
12 |
|
33 |
class wp_piwik {
|
34 |
|
35 |
private static
|
36 |
+
$intRevisionId = 80502,
|
37 |
+
$strVersion = '0.8.5',
|
38 |
$intDashboardID = 6,
|
39 |
$bolWPMU = false,
|
40 |
$bolOverall = false,
|
48 |
'dashboard_widget' => false,
|
49 |
'capability_stealth' => array(),
|
50 |
'capability_read_stats' => array('administrator' => true),
|
51 |
+
'piwik_shortcut' => false,
|
52 |
+
'default_date' => 'yesterday'
|
53 |
),
|
54 |
$arySettings = array(
|
55 |
'tracking_code' => '',
|
158 |
'dashboard_widget' => false,
|
159 |
'capability_stealth' => get_site_option('wpmu-piwik_filter', array()),
|
160 |
'capability_read_stats' => $aryDisplayToCap,
|
161 |
+
'piwik_shortcut' => false,
|
162 |
);
|
163 |
else self::$aryGlobalSettings = array(
|
164 |
'revision' => get_option('wp-piwik_revision',0),
|
169 |
'dashboard_widget' => $aryDashboardWidgetRange[get_option('wp-piwik_dbwidget', 0)],
|
170 |
'capability_stealth' => get_option('wp-piwik_filter', array()),
|
171 |
'capability_read_stats' => $aryDisplayToCap,
|
172 |
+
'piwik_shortcut' => get_option('wp-piwik_piwiklink',false),
|
173 |
);
|
174 |
self::$arySettings = array(
|
175 |
'tracking_code' => '',
|
188 |
foreach ($aryRemoveOptions as $strRemoveOption) {
|
189 |
delete_option($strRemoveOption);
|
190 |
if (self::$bolWPMU) delete_site_option($strRemoveOption);
|
191 |
+
}
|
192 |
+
};
|
193 |
+
if (self::$aryGlobalSettings['revision'] < 80502) {
|
194 |
+
self::$aryGlobalSettings['default_date'] = 'yesterday';
|
195 |
+
}
|
196 |
+
add_action('admin_footer', array($this, 'updateMessage'));
|
197 |
// Set current revision ID
|
198 |
self::$aryGlobalSettings['revision'] = self::$intRevisionId;
|
199 |
self::$aryGlobalSettings['last_settings_update'] = time();
|
536 |
);
|
537 |
if (isset($_GET['date']) && preg_match('/^[0-9]{8}$/', $_GET['date']) && $aryParams[0] != 'visitors')
|
538 |
$aryDashboard[$strCol][$aryParams[0]]['params']['date'] = $_GET['date'];
|
539 |
+
elseif ($aryParams[0] != 'visitors')
|
540 |
+
$aryDashboard[$strCol][$aryParams[0]]['params']['date'] = self::$aryGlobalSettings['default_date'];
|
541 |
}
|
542 |
}
|
543 |
/***************************************************************************/ ?>
|
601 |
|
602 |
function applySettings() {
|
603 |
if (!self::$bolWPMU) {
|
604 |
+
self::$aryGlobalSettings['add_tracking_code'] = (isset($_POST['wp-piwik_addjs'])?$_POST['wp-piwik_addjs']:'');
|
605 |
+
self::$aryGlobalSettings['dashboard_widget'] = (isset($_POST['wp-piwik_dbwidget'])?$_POST['wp-piwik_dbwidget']:false);
|
606 |
+
self::$aryGlobalSettings['piwik_shortcut'] = (isset($_POST['wp-piwik_piwiklink'])?$_POST['wp-piwik_piwiklink']:false);
|
607 |
+
self::$arySettings['site_id'] = (isset($_POST['wp-piwik_siteid'])?$_POST['wp-piwik_siteid']:NULL);
|
608 |
+
self::$arySettings['track_404'] = (isset($_POST['wp-piwik_404'])?$_POST['wp-piwik_404']:false);
|
609 |
+
self::$aryGlobalSettings['default_date'] = (isset($_POST['wp-piwik_default_date'])?$_POST['wp-piwik_default_date']:'yesterday');
|
610 |
}
|
611 |
self::$aryGlobalSettings['piwik_token'] = (isset($_POST['wp-piwik_token'])?$_POST['wp-piwik_token']:'');
|
612 |
self::$aryGlobalSettings['piwik_url'] = (isset($_POST['wp-piwik_url'])?$_POST['wp-piwik_url']:'');
|
748 |
($intShowLink?' checked="checked"':"").'/></div>';
|
749 |
echo '<div class="wp-piwik_desc">'.
|
750 |
__('Display a shortcut to Piwik itself.', 'wp-piwik').'</div>';
|
751 |
+
echo '<h4><label for="wp-piwik_default_date">'.__('Default date', 'wp-piwik').':</label></h4>'.
|
752 |
+
'<div class="input-wrap"><select id="wp-piwik_default_date" name="wp-piwik_default_date">'.
|
753 |
+
'<option value="yesterday"'.(self::$aryGlobalSettings['default_date'] == 'yesterday'?' selected="selected"':'').'> '.__('yesterday', 'wp-piwik').'</option>'.
|
754 |
+
'<option value="today"'.(self::$aryGlobalSettings['default_date'] == 'today'?' selected="selected"':'').'> '.__('today', 'wp-piwik').'</option>'.
|
755 |
+
'</select></div>';
|
756 |
+
echo '<div class="wp-piwik_desc">'.
|
757 |
+
__('Default date shown on statistics page.', 'wp-piwik').'</div>';
|
758 |
echo '<h4><label>'.__('Display to', 'wp-piwik').':</label></h4>';
|
759 |
echo '<div class="input-wrap">';
|
760 |
$intDisplayTo = self::$aryGlobalSettings['capability_read_stats'];
|