WP-Matomo (WP-Piwik) - Version 0.9.6.1

Version Description

Toolbar graph bugfix

=

Download this release

Release Info

Developer Braekling
Plugin Icon 128x128 WP-Matomo (WP-Piwik)
Version 0.9.6.1
Comparing to
See all releases

Code changes from version 0.9.6 to 0.9.6.1

Files changed (2) hide show
  1. readme.txt +7 -1
  2. wp-piwik.php +6 -5
readme.txt CHANGED
@@ -3,7 +3,7 @@
3
  Contributors: Braekling
4
  Requires at least: 3.4
5
  Tested up to: 3.4.2
6
- Stable tag: 0.9.6
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
 
@@ -95,8 +95,14 @@ Add WP-Piwik to your /wp-content/plugins folder and enable it as [Network Plugin
95
  = 0.9.6 =
96
  WordPress metabox concept used properly, different bugfixes, custom variables feature added.
97
 
 
 
 
98
  == Changelog ==
99
 
 
 
 
100
  = 0.9.6 =
101
  * Option: Disable SSL peer verification (REST API)
102
  * Option: Use own user agent
3
  Contributors: Braekling
4
  Requires at least: 3.4
5
  Tested up to: 3.4.2
6
+ Stable tag: 0.9.6.1
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
 
95
  = 0.9.6 =
96
  WordPress metabox concept used properly, different bugfixes, custom variables feature added.
97
 
98
+ = 0.9.6.1 =
99
+ Toolbar graph bugfix
100
+
101
  == Changelog ==
102
 
103
+ = 0.9.6.1 =
104
+ * Toolbar graph bugfix
105
+
106
  = 0.9.6 =
107
  * Option: Disable SSL peer verification (REST API)
108
  * Option: Use own user agent
wp-piwik.php CHANGED
@@ -6,7 +6,7 @@ Plugin URI: http://wordpress.org/extend/plugins/wp-piwik/
6
 
7
  Description: Adds Piwik stats to your dashboard menu and Piwik code to your wordpress footer.
8
 
9
- Version: 0.9.6
10
  Author: André Bräkling
11
  Author URI: http://www.braekling.de
12
 
@@ -60,13 +60,13 @@ if (!function_exists('is_plugin_active_for_network'))
60
  class wp_piwik {
61
 
62
  private static
63
- $intRevisionId = 90601,
64
- $strVersion = '0.9.6',
65
  $intDashboardID = 30,
66
  $strPluginBasename = NULL,
67
  $bolJustActivated = false,
68
  $aryGlobalSettings = array(
69
- 'revision' => 90601,
70
  'add_tracking_code' => false,
71
  'last_settings_update' => 0,
72
  'piwik_token' => '',
@@ -528,8 +528,9 @@ class wp_piwik {
528
  */
529
  public function extendWordPressToolbar(&$objToolbar) {
530
  // Is user allowed to see stats?
531
- if (current_user_can('wp-piwik_read_stats') && is_array($aryUnique)) {
532
  $aryUnique = $this->callPiwikAPI('VisitsSummary.getUniqueVisitors','day','last30',null);
 
533
  $strGraph = '<script type="text/javascript">';
534
  $strGraph .= "var \$jSpark = jQuery.noConflict();\$jSpark(function() {var piwikSparkVals=[".implode(',',$aryUnique)."];\$jSpark('.wp-piwik_dynbar').sparkline(piwikSparkVals, {type: 'bar', barColor: '#ccc', barWidth:2});});";
535
  $strGraph .= '</script>';
6
 
7
  Description: Adds Piwik stats to your dashboard menu and Piwik code to your wordpress footer.
8
 
9
+ Version: 0.9.6.1
10
  Author: Andr&eacute; Br&auml;kling
11
  Author URI: http://www.braekling.de
12
 
60
  class wp_piwik {
61
 
62
  private static
63
+ $intRevisionId = 90602,
64
+ $strVersion = '0.9.6.1',
65
  $intDashboardID = 30,
66
  $strPluginBasename = NULL,
67
  $bolJustActivated = false,
68
  $aryGlobalSettings = array(
69
+ 'revision' => 90602,
70
  'add_tracking_code' => false,
71
  'last_settings_update' => 0,
72
  'piwik_token' => '',
528
  */
529
  public function extendWordPressToolbar(&$objToolbar) {
530
  // Is user allowed to see stats?
531
+ if (current_user_can('wp-piwik_read_stats')) {
532
  $aryUnique = $this->callPiwikAPI('VisitsSummary.getUniqueVisitors','day','last30',null);
533
+ if (!is_array($aryUnique)) $aryUnique = array();
534
  $strGraph = '<script type="text/javascript">';
535
  $strGraph .= "var \$jSpark = jQuery.noConflict();\$jSpark(function() {var piwikSparkVals=[".implode(',',$aryUnique)."];\$jSpark('.wp-piwik_dynbar').sparkline(piwikSparkVals, {type: 'bar', barColor: '#ccc', barWidth:2});});";
536
  $strGraph .= '</script>';