Version Description
Download this release
Release Info
Developer | Braekling |
Plugin | WP-Matomo (WP-Piwik) |
Version | 0.3.1 |
Comparing to | |
See all releases |
Code changes from version 0.3.0 to 0.3.1
- css/wp-piwik.css +4 -0
- dashboard/browsers.php +54 -41
- dashboard/footer.php +6 -1
- dashboard/header.php +14 -2
- dashboard/keywords.php +26 -19
- dashboard/overview.php +34 -22
- dashboard/visitors.php +76 -62
- dashboard/websites.php +29 -19
- js/wp-piwik.js +3 -5
- readme.txt +3 -3
- screenshot-1.gif +0 -0
- wp-piwik.php +160 -122
css/wp-piwik.css
CHANGED
@@ -1,3 +1,7 @@
|
|
|
|
|
|
|
|
|
|
1 |
span.wp-piwik-details {
|
2 |
font-size:0.8em;
|
3 |
font-weight:normal;
|
1 |
+
div.wp-piwik-sortables {
|
2 |
+
margin:0 5px;
|
3 |
+
}
|
4 |
+
|
5 |
span.wp-piwik-details {
|
6 |
font-size:0.8em;
|
7 |
font-weight:normal;
|
dashboard/browsers.php
CHANGED
@@ -1,48 +1,61 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
4 |
$aryConf['params']['period'],
|
5 |
$aryConf['params']['date'],
|
6 |
-
|
7 |
-
|
8 |
-
$aryConf['title'] = __('Browser', 'wp-piwik');
|
9 |
-
include('header.php');
|
10 |
-
$strValues = $strLabels = '';
|
11 |
-
|
12 |
-
$
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
$strGraph .= 'chd=t:'.$strValues.'&';
|
28 |
-
$strGraph .= 'chl='.$strLabels.'&';
|
29 |
-
$strGraph .= 'chco=90AAD9,A0BAE9&';
|
30 |
-
?>
|
31 |
<div class="wp-piwik-graph-wide">
|
32 |
-
<img src="<?php echo $strBase.$strGraph; ?>" width="500" height="220" alt="Visits graph" />
|
33 |
</div>
|
34 |
<div class="table">
|
35 |
-
<table class="widefat wp-piwik-table">
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
</div>
|
48 |
-
<?php
|
|
|
|
|
|
1 |
<?php
|
2 |
+
/*********************************
|
3 |
+
WP-Piwik::Stats:Browser
|
4 |
+
**********************************/
|
5 |
+
|
6 |
+
$aryConf['data'] = $this->call_API(
|
7 |
+
'UserSettings.getBrowser',
|
8 |
$aryConf['params']['period'],
|
9 |
$aryConf['params']['date'],
|
10 |
+
$aryConf['params']['limit']
|
11 |
+
);
|
12 |
+
$aryConf['title'] = __('Browser', 'wp-piwik');
|
13 |
+
include('header.php');
|
14 |
+
$strValues = $strLabels = '';
|
15 |
+
$intSum = 0;
|
16 |
+
foreach ($aryConf['data'] as $aryValues)
|
17 |
+
$intSum += $aryValues['nb_uniq_visitors'];
|
18 |
+
foreach ($aryConf['data'] as $aryValues) {
|
19 |
+
$strValues .= round(($aryValues['nb_uniq_visitors']/$intSum*100), 2).',';
|
20 |
+
$strLabels .= '|'.urlencode($aryValues['shortLabel']);
|
21 |
+
}
|
22 |
+
$strValues = substr($strValues, 0, -1);
|
23 |
+
$strLabels = substr($strLabels, 1);
|
24 |
+
$strBase = 'http://chart.apis.google.com/chart?'.
|
25 |
+
'cht=p&'.
|
26 |
+
'chs=500x220&'.
|
27 |
+
'chd=t:'.$strValues.'&'.
|
28 |
+
'chl='.$strLabels.'&'.
|
29 |
+
'chco=90AAD9,A0BAE9&';
|
30 |
+
/***************************************************************************/ ?>
|
|
|
|
|
|
|
|
|
31 |
<div class="wp-piwik-graph-wide">
|
32 |
+
<img src="<?php echo $strBase.$strGraph; ?>" width="500" height="220" alt="Visits graph" />
|
33 |
</div>
|
34 |
<div class="table">
|
35 |
+
<table class="widefat wp-piwik-table">
|
36 |
+
<thead>
|
37 |
+
<tr>
|
38 |
+
<th><?php _e('Browser', 'wp-piwik'); ?></th>
|
39 |
+
<th class="n"><?php _e('Unique', 'wp-piwik'); ?></th>
|
40 |
+
<th class="n"><?php _e('Percent', 'wp-piwik'); ?></th>
|
41 |
+
</tr>
|
42 |
+
</thead>
|
43 |
+
<tbody>
|
44 |
+
<?php /************************************************************************/
|
45 |
+
foreach ($aryConf['data'] as $aryValues)
|
46 |
+
echo '<tr><td>'.
|
47 |
+
$aryValues['shortLabel'].
|
48 |
+
'</td><td class="n">'.
|
49 |
+
$aryValues['nb_uniq_visitors'].
|
50 |
+
'</td><td class="n">'.
|
51 |
+
number_format(($aryValues['nb_uniq_visitors']*$intSum/100),2).
|
52 |
+
'%</td></tr>';
|
53 |
+
unset($aryTmp);
|
54 |
+
/***************************************************************************/ ?>
|
55 |
+
</tbody>
|
56 |
+
</table>
|
57 |
</div>
|
58 |
+
<?php /************************************************************************/
|
59 |
+
include ('footer.php');
|
60 |
+
|
61 |
+
/* EOF */
|
dashboard/footer.php
CHANGED
@@ -1,2 +1,7 @@
|
|
1 |
-
|
|
|
|
|
|
|
|
|
|
|
2 |
</div>
|
1 |
+
<?php
|
2 |
+
/*********************************
|
3 |
+
WP-Piwik::Stats:Footer
|
4 |
+
**********************************/
|
5 |
+
?>
|
6 |
+
</div>
|
7 |
</div>
|
dashboard/header.php
CHANGED
@@ -1,3 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<div id="<?php echo $aryConf['id']; ?>" class="postbox <?php echo ($aryConf['closed']?'if-js-closed':''); ?>" >
|
2 |
-
<div class="handlediv" title="Zum Umschalten klicken"
|
3 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*********************************
|
3 |
+
WP-Piwik::Stats:Header
|
4 |
+
**********************************/
|
5 |
+
?>
|
6 |
<div id="<?php echo $aryConf['id']; ?>" class="postbox <?php echo ($aryConf['closed']?'if-js-closed':''); ?>" >
|
7 |
+
<div class="handlediv" title="Zum Umschalten klicken">
|
8 |
+
<br />
|
9 |
+
</div>
|
10 |
+
<h3 class='hndle'>
|
11 |
+
<span>
|
12 |
+
<?php echo $aryConf['title']; echo ' <span class="wp-piwik-details">('.$aryConf['desc'].')</span>'; ?>
|
13 |
+
</span>
|
14 |
+
</h3>
|
15 |
+
<div class="inside">
|
dashboard/keywords.php
CHANGED
@@ -1,22 +1,29 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
$aryConf['
|
9 |
-
|
10 |
-
|
|
|
|
|
|
|
|
|
11 |
<table class="widefat">
|
12 |
-
<thead>
|
13 |
-
|
14 |
-
</thead>
|
15 |
-
<tbody>
|
16 |
-
<?php
|
17 |
-
foreach ($aryConf['data'] as $aryValues)
|
18 |
-
|
19 |
-
?>
|
20 |
-
</tbody>
|
21 |
</table>
|
22 |
-
<?php
|
|
|
|
|
|
1 |
<?php
|
2 |
+
/*********************************
|
3 |
+
WP-Piwik::Stats:Keywords
|
4 |
+
**********************************/
|
5 |
+
|
6 |
+
$aryConf['data'] = $this->call_API(
|
7 |
+
'Referers.getKeywords',
|
8 |
+
$aryConf['params']['period'],
|
9 |
+
$aryConf['params']['date'],
|
10 |
+
$aryConf['params']['limit']
|
11 |
+
);
|
12 |
+
$aryConf['title'] = __('Keywords', 'wp-piwik');
|
13 |
+
include('header.php');
|
14 |
+
/***************************************************************************/ ?>
|
15 |
<table class="widefat">
|
16 |
+
<thead>
|
17 |
+
<tr><th><?php _e('Keyword', 'wp-piwik'); ?></th><th><?php _e('Unique', 'wp-piwik'); ?></th></tr>
|
18 |
+
</thead>
|
19 |
+
<tbody>
|
20 |
+
<?php /************************************************************************/
|
21 |
+
foreach ($aryConf['data'] as $aryValues)
|
22 |
+
echo '<tr><td>'.$aryValues['label'].'</td><td>'.$aryValues['nb_uniq_visitors'].'</td></tr>';
|
23 |
+
/***************************************************************************/ ?>
|
24 |
+
</tbody>
|
25 |
</table>
|
26 |
+
<?php /************************************************************************/
|
27 |
+
include ('footer.php');
|
28 |
+
|
29 |
+
/* EOF */
|
dashboard/overview.php
CHANGED
@@ -1,24 +1,36 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
$aryConf['
|
9 |
-
|
10 |
-
|
|
|
|
|
|
|
|
|
11 |
<div class="table">
|
12 |
-
<table class="widefat">
|
13 |
-
<tbody>
|
14 |
-
<?php
|
15 |
-
$strTime =
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
echo '<tr><td>'.__('
|
20 |
-
echo '<tr><td>'.__('
|
21 |
-
echo '<tr><td>'.__('
|
22 |
-
echo '</
|
23 |
-
|
24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<?php
|
2 |
+
/*********************************
|
3 |
+
WP-Piwik::Stats:Overview
|
4 |
+
**********************************/
|
5 |
+
|
6 |
+
$aryConf['data'] = $this->call_API(
|
7 |
+
'VisitsSummary.get',
|
8 |
+
$aryConf['params']['period'],
|
9 |
+
$aryConf['params']['date'],
|
10 |
+
$aryConf['params']['limit']
|
11 |
+
);
|
12 |
+
$aryConf['title'] = __('Overview', 'wp-piwik');
|
13 |
+
include('header.php');
|
14 |
+
/***************************************************************************/ ?>
|
15 |
<div class="table">
|
16 |
+
<table class="widefat">
|
17 |
+
<tbody>
|
18 |
+
<?php /************************************************************************/
|
19 |
+
$strTime =
|
20 |
+
floor($aryConf['data']['sum_visit_length']/3600).'h '.
|
21 |
+
floor(($aryConf['data']['sum_visit_length'] % 3600)/60).'m '.
|
22 |
+
floor(($aryConf['data']['sum_visit_length'] % 3600) % 60).'s';
|
23 |
+
echo '<tr><td>'.__('Visitors', 'wp-piwik').':</td><td>'.$aryConf['data']['nb_visits'].'</td></tr>';
|
24 |
+
echo '<tr><td>'.__('Unique visitors', 'wp-piwik').':</td><td>'.$aryConf['data']['nb_uniq_visitors'].'</td></tr>';
|
25 |
+
echo '<tr><td>'.__('Page views', 'wp-piwik').':</td><td>'.$aryConf['data']['nb_actions'].'</td></tr>';
|
26 |
+
echo '<tr><td>'.__('Max. page views in one visit', 'wp-piwik').':</td><td>'.$aryConf['data']['max_actions'].'</td></tr>';
|
27 |
+
echo '<tr><td>'.__('Total time spent by visitors', 'wp-piwik').':</td><td>'.$strTime.'</td></tr>';
|
28 |
+
echo '<tr><td>'.__('Bounce count', 'wp-piwik').':</td><td>'.$aryConf['data']['bounce_count'].'</td></tr>';
|
29 |
+
/***************************************************************************/ ?>
|
30 |
+
</tbody>
|
31 |
+
</table>
|
32 |
+
</div>
|
33 |
+
<?php /************************************************************************/
|
34 |
+
include ('footer.php');
|
35 |
+
|
36 |
+
/* EOF */
|
dashboard/visitors.php
CHANGED
@@ -1,68 +1,82 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
$aryConf['params']['date'],
|
6 |
-
$aryConf['params']['limit']
|
7 |
-
);
|
8 |
-
$aryConf['data']['Unique'] = $this->call_API(
|
9 |
-
'VisitsSummary.getUniqueVisitors',
|
10 |
-
$aryConf['params']['period'],
|
11 |
-
$aryConf['params']['date'],
|
12 |
-
$aryConf['params']['limit']
|
13 |
-
);
|
14 |
-
$aryConf['data']['Bounced'] = $this->call_API(
|
15 |
-
'VisitsSummary.getBounceCount',
|
16 |
-
$aryConf['params']['period'],
|
17 |
-
$aryConf['params']['date'],
|
18 |
-
$aryConf['params']['limit']
|
19 |
-
);
|
20 |
|
21 |
-
$aryConf['
|
22 |
-
|
23 |
-
$
|
24 |
-
$
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
$
|
36 |
-
$
|
37 |
-
$
|
38 |
-
|
39 |
-
$
|
40 |
-
|
41 |
-
$
|
42 |
-
$
|
43 |
-
$
|
44 |
-
$
|
45 |
-
$
|
46 |
-
$
|
47 |
-
$
|
48 |
-
$
|
49 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
<div class="wp-piwik-graph-wide">
|
51 |
-
<img src="<?php echo $strBase.$strGraph; ?>" width="500" height="220" alt="Visits graph" />
|
52 |
</div>
|
53 |
<div class="table">
|
54 |
-
<table class="widefat wp-piwik-table">
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
</div>
|
68 |
-
<?php
|
|
|
|
|
|
1 |
<?php
|
2 |
+
/*********************************
|
3 |
+
WP-Piwik::Stats:Vistors
|
4 |
+
**********************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
|
6 |
+
$aryConf['data']['Visitors'] = $this->call_API(
|
7 |
+
'VisitsSummary.getVisits',
|
8 |
+
$aryConf['params']['period'],
|
9 |
+
$aryConf['params']['date'],
|
10 |
+
$aryConf['params']['limit']
|
11 |
+
);
|
12 |
+
$aryConf['data']['Unique'] = $this->call_API(
|
13 |
+
'VisitsSummary.getUniqueVisitors',
|
14 |
+
$aryConf['params']['period'],
|
15 |
+
$aryConf['params']['date'],
|
16 |
+
$aryConf['params']['limit']
|
17 |
+
);
|
18 |
+
$aryConf['data']['Bounced'] = $this->call_API(
|
19 |
+
'VisitsSummary.getBounceCount',
|
20 |
+
$aryConf['params']['period'],
|
21 |
+
$aryConf['params']['date'],
|
22 |
+
$aryConf['params']['limit']
|
23 |
+
);
|
24 |
+
$aryConf['title'] = __('Visitors', 'wp-piwik');
|
25 |
+
include('header.php');
|
26 |
+
$strValues = $strLabels = $strBounced = $strValuesU = '';
|
27 |
+
$intMax = max($aryConf['data']['Visitors']);
|
28 |
+
while ($intMax % 10 != 0 || $intMax == 0) $intMax++;
|
29 |
+
$intStep = $intMax / 5;
|
30 |
+
while ($intStep % 10 != 0 && $intStep != 1) $intStep--;
|
31 |
+
foreach ($aryConf['data']['Visitors'] as $strDate => $intValue) {
|
32 |
+
$strValues .= round($intValue/($intMax/100),2).',';
|
33 |
+
$strValuesU .= round($aryConf['data']['Unique'][$strDate]/($intMax/100),2).',';
|
34 |
+
$strBounced .= round($aryConf['data']['Bounced'][$strDate]/($intMax/100),2).',';
|
35 |
+
$strLabels .= '|'.substr($strDate,-2);
|
36 |
+
}
|
37 |
+
$strValues = substr($strValues, 0, -1);
|
38 |
+
$strValuesU = substr($strValuesU, 0, -1);
|
39 |
+
$strBounced = substr($strBounced, 0, -1);
|
40 |
+
$strBase = 'http://chart.apis.google.com/chart?';
|
41 |
+
$strGraph = 'cht=lc&'.
|
42 |
+
'chg=0,'.round($intStep/($intMax/100),2).',2,2&'.
|
43 |
+
'chs=500x220&'.
|
44 |
+
'chd=t:'.$strValues.'|'.$strValuesU.'|'.$strBounced.'&'.
|
45 |
+
'chxl=0:'.$strLabels.'&'.
|
46 |
+
'chco=90AAD9,A0BAE9,E9A0BA&'.
|
47 |
+
'chm=B,D4E2ED,0,1,0|B,E4F2FD,1,2,0|B,FDE4F2,2,3,0&'.
|
48 |
+
'chxt=x,y&'.
|
49 |
+
'chxr=1,0,'.$intMax.','.$intStep;
|
50 |
+
/***************************************************************************/ ?>
|
51 |
<div class="wp-piwik-graph-wide">
|
52 |
+
<img src="<?php echo $strBase.$strGraph; ?>" width="500" height="220" alt="Visits graph" />
|
53 |
</div>
|
54 |
<div class="table">
|
55 |
+
<table class="widefat wp-piwik-table">
|
56 |
+
<thead>
|
57 |
+
<tr>
|
58 |
+
<th><?php _e('Date', 'wp-piwik'); ?></th>
|
59 |
+
<th class="n"><?php _e('Visits', 'wp-piwik'); ?></th>
|
60 |
+
<th class="n"><?php _e('Unique', 'wp-piwik'); ?></th>
|
61 |
+
<th class="n"><?php _e('Bounced', 'wp-piwik'); ?></th>
|
62 |
+
</tr>
|
63 |
+
</thead>
|
64 |
+
<tbody>
|
65 |
+
<?php /************************************************************************/
|
66 |
+
$aryTmp = array_reverse($aryConf['data']['Visitors']);
|
67 |
+
foreach ($aryTmp as $strDate => $intValue)
|
68 |
+
echo '<tr><td>'.$strDate.'</td><td class="n">'.
|
69 |
+
$intValue.'</td><td class="n">'.
|
70 |
+
$aryConf['data']['Unique'][$strDate].
|
71 |
+
'</td><td class="n">'.
|
72 |
+
$aryConf['data']['Bounced'][$strDate].
|
73 |
+
'</td></tr>';
|
74 |
+
unset($aryTmp);
|
75 |
+
/***************************************************************************/ ?>
|
76 |
+
</tbody>
|
77 |
+
</table>
|
78 |
</div>
|
79 |
+
<?php /************************************************************************/
|
80 |
+
include ('footer.php');
|
81 |
+
|
82 |
+
/* EOF */
|
dashboard/websites.php
CHANGED
@@ -1,22 +1,32 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
$aryConf['
|
9 |
-
|
10 |
-
|
|
|
|
|
|
|
|
|
11 |
<table class="widefat">
|
12 |
-
<thead>
|
13 |
-
|
14 |
-
|
15 |
-
<
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
|
|
|
|
|
|
21 |
</table>
|
22 |
-
<?php
|
|
|
|
|
|
1 |
<?php
|
2 |
+
/*********************************
|
3 |
+
WP-Piwik::Stats:Websites
|
4 |
+
**********************************/
|
5 |
+
|
6 |
+
$aryConf['data'] = $this->call_API(
|
7 |
+
'Referers.getWebsites',
|
8 |
+
$aryConf['params']['period'],
|
9 |
+
$aryConf['params']['date'],
|
10 |
+
$aryConf['params']['limit']
|
11 |
+
);
|
12 |
+
$aryConf['title'] = __('Websites', 'wp-piwik');
|
13 |
+
include('header.php');
|
14 |
+
/***************************************************************************/ ?>
|
15 |
<table class="widefat">
|
16 |
+
<thead>
|
17 |
+
<tr>
|
18 |
+
<th><?php _e('Website', 'wp-piwik'); ?></th>
|
19 |
+
<th><?php _e('Unique', 'wp-piwik'); ?></th>
|
20 |
+
</tr>
|
21 |
+
</thead>
|
22 |
+
<tbody>
|
23 |
+
<?php /************************************************************************/
|
24 |
+
foreach ($aryConf['data'] as $aryValues)
|
25 |
+
echo '<tr><td>'.$aryValues['label'].'</td><td>'.$aryValues['nb_uniq_visitors'].'</td></tr>';
|
26 |
+
/***************************************************************************/ ?>
|
27 |
+
</tbody>
|
28 |
</table>
|
29 |
+
<?php /************************************************************************/
|
30 |
+
include ('footer.php');
|
31 |
+
|
32 |
+
/* EOF */
|
js/wp-piwik.js
CHANGED
@@ -1,7 +1,5 @@
|
|
1 |
-
|
2 |
jQuery( function($) {
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
postboxes.add_postbox_toggles('wppiwik');
|
7 |
} );
|
|
|
1 |
jQuery( function($) {
|
2 |
+
// close postboxes that should be closed
|
3 |
+
jQuery('.if-js-closed').removeClass('if-js-closed').addClass('closed');
|
4 |
+
postboxes.add_postbox_toggles('wppiwik');
|
|
|
5 |
} );
|
readme.txt
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
=== WP-Piwik ===
|
2 |
Contributors: braekling
|
3 |
Requires at least: 2.7
|
4 |
-
Tested up to: 2.
|
5 |
-
Stable tag: 0.3.
|
6 |
-
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=6046779
|
7 |
Tags: statistics, stats, analytics, piwik
|
8 |
|
9 |
This plugin adds a piwik stats site to your WordPress dashboard.
|
@@ -18,6 +17,7 @@ Look at the [Piwik website](http://piwik.org/) to get further information about
|
|
18 |
*This plugin is not created or provided by the Piwik project team.*
|
19 |
|
20 |
License: GNU General Public License Version 3, 29 June 2007
|
|
|
21 |
Languages: English, German
|
22 |
|
23 |
== Installation ==
|
1 |
=== WP-Piwik ===
|
2 |
Contributors: braekling
|
3 |
Requires at least: 2.7
|
4 |
+
Tested up to: 2.8
|
5 |
+
Stable tag: 0.3.1
|
|
|
6 |
Tags: statistics, stats, analytics, piwik
|
7 |
|
8 |
This plugin adds a piwik stats site to your WordPress dashboard.
|
17 |
*This plugin is not created or provided by the Piwik project team.*
|
18 |
|
19 |
License: GNU General Public License Version 3, 29 June 2007
|
20 |
+
|
21 |
Languages: English, German
|
22 |
|
23 |
== Installation ==
|
screenshot-1.gif
CHANGED
Binary file
|
wp-piwik.php
CHANGED
@@ -6,45 +6,44 @@ Plugin URI: http://dev.braekling.de/wordpress-plugins/dev/wp-piwik/index.html
|
|
6 |
|
7 |
Description: Adds Piwik stats to your dashboard menu and Piwik code to your wordpress footer.
|
8 |
|
9 |
-
Version: 0.3.
|
10 |
Author: André Bräkling
|
11 |
Author URI: http://www.braekling.de
|
12 |
|
13 |
******************************************************************************************
|
14 |
-
|
15 |
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
|
26 |
-
|
27 |
-
|
28 |
*******************************************************************************************/
|
29 |
|
30 |
class wp_piwik {
|
31 |
|
32 |
function __construct() {
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
register_activation_hook(__FILE__, array($this, 'install'));
|
40 |
add_action('admin_menu', array($this, 'build_menu'));
|
41 |
-
add_filter('plugin_row_meta', array($this, 'set_plugin_meta', 10, 2)
|
42 |
if (get_option('wp-piwik_addjs') == 1)
|
43 |
add_action('wp_footer', array($this, 'footer'));
|
44 |
}
|
45 |
-
|
46 |
function install() {
|
47 |
-
|
48 |
}
|
49 |
|
50 |
function footer() {
|
@@ -52,22 +51,43 @@ class wp_piwik {
|
|
52 |
}
|
53 |
|
54 |
function build_menu() {
|
55 |
-
$
|
56 |
-
|
57 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
|
59 |
-
add_options_page(
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
}
|
61 |
|
62 |
-
function set_plugin_meta($strLinks, $strFile) {
|
63 |
$strPlugin = plugin_basename(__FILE__);
|
64 |
if ($strFile == $strPlugin)
|
65 |
-
return array_merge(
|
|
|
|
|
|
|
|
|
|
|
66 |
return $strLinks;
|
67 |
}
|
68 |
-
|
69 |
function load_scripts() {
|
70 |
-
wp_enqueue_script(
|
|
|
|
|
|
|
|
|
71 |
}
|
72 |
|
73 |
function add_admin_header() {
|
@@ -81,8 +101,8 @@ function set_plugin_meta($strLinks, $strFile) {
|
|
81 |
function call_API($strMethod, $strPeriod='', $strDate='', $intLimit='') {
|
82 |
$strKey = $strMethod.'_'.$strPeriod.'_'.$strDate.'_'.$intLimit;
|
83 |
if (empty($this->aryCache[$strKey])) {
|
84 |
-
|
85 |
-
|
86 |
$intSite = get_option('wp-piwik_siteid');
|
87 |
if (empty($strToken) || empty($strURL)) {
|
88 |
$this->aryCache[$key] = array(
|
@@ -91,47 +111,43 @@ function set_plugin_meta($strLinks, $strFile) {
|
|
91 |
);
|
92 |
return $this->aryCache[$strKey];
|
93 |
}
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
}
|
102 |
return $this->aryCache[$strKey];
|
103 |
}
|
104 |
|
105 |
function create_dashboard_widget($strFile, $aryConfig) {
|
106 |
-
foreach ($aryConfig['params'] as $strParam)
|
107 |
if (!empty($strParam)) {
|
108 |
$strDesc .= $strParam.', ';
|
109 |
-
|
110 |
}
|
111 |
-
}
|
112 |
$strFile = str_replace('.', '', $strFile);
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
'desc' => substr($strDesc, 0, -2)));
|
117 |
$strRoot = dirname(__FILE__);
|
118 |
if (file_exists($strRoot.DIRECTORY_SEPARATOR.'dashboard/'.$strFile.'.php'))
|
119 |
-
|
120 |
}
|
121 |
|
122 |
function show_stats() {
|
123 |
$arySortOrder = get_user_option('meta-box-order_wppiwik');
|
124 |
$aryClosed = get_user_option('closedpostboxes_wppiwik');
|
125 |
if (empty($aryClosed)) $aryClosed = array();
|
126 |
-
|
127 |
$aryDashboard = array();
|
128 |
if (!$arySortOrder) {
|
129 |
// Set default configuration
|
130 |
$arySortOrder = array(
|
131 |
'side' => 'overview_day_yesterday,keywords_day_yesterday_10,websites_day_yesterday_10',
|
132 |
'normal' => 'visitors_day_last30,browsers_day_yesterday'
|
133 |
-
|
134 |
-
|
135 |
update_user_option($GLOBALS['current_user']->ID, 'meta-box-order_wppiwik', $arySortOrder);
|
136 |
}
|
137 |
foreach ($arySortOrder as $strCol => $strWidgets) {
|
@@ -148,99 +164,121 @@ function set_plugin_meta($strLinks, $strFile) {
|
|
148 |
);
|
149 |
}
|
150 |
}
|
151 |
-
?>
|
152 |
-
<div class="wrap"
|
153 |
-
<
|
154 |
-
<
|
155 |
-
<div id="
|
156 |
-
<div id="
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
162 |
</div>
|
163 |
</div>
|
164 |
-
|
165 |
-
<div id='wppiwik-widgets-main-content' class='has-sidebar-content'>
|
166 |
-
<div id='normal-sortables' class='meta-box-sortables'>
|
167 |
-
<?php
|
168 |
-
foreach ($aryDashboard['normal'] as $strFile => $aryConfig)
|
169 |
-
$this->create_dashboard_widget($strFile, $aryConfig);
|
170 |
-
wp_nonce_field('meta-box-order', 'meta-box-order-nonce', false);
|
171 |
-
wp_nonce_field('closedpostboxes', 'closedpostboxesnonce', false);
|
172 |
-
?>
|
173 |
-
|
174 |
-
<div class="clear"></div>
|
175 |
-
</div><!-- wppiwik-widgets-wrap -->
|
176 |
-
|
177 |
-
</div>
|
178 |
-
</div>
|
179 |
-
</div>
|
180 |
-
</div>
|
181 |
-
</div>
|
182 |
-
<?php
|
183 |
}
|
184 |
|
185 |
function show_settings() {
|
186 |
$strToken = get_option('wp-piwik_token');
|
187 |
$strURL = get_option('wp-piwik_url');
|
188 |
$intSite = get_option('wp-piwik_siteid');
|
189 |
-
?>
|
190 |
<div class="wrap">
|
191 |
-
<h2><?php _e('WP-Piwik Settings', 'wp-piwik') ?></h2>
|
192 |
-
<div class="inside">
|
193 |
-
<form method="post" action="options.php">
|
194 |
-
|
195 |
-
<table class="form-table">
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
208 |
if (!empty($strToken) && !empty($strURL)) {
|
209 |
$aryData = $this->call_API('SitesManager.getSitesWithAtLeastViewAccess');
|
210 |
if (empty($aryData)) {
|
211 |
-
echo '<tr><td colspan="2"><p><strong>'.__('An error occured', 'wp-piwik').': </strong>'.
|
|
|
|
|
212 |
} elseif ($aryData['result'] == 'error') {
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
|
|
|
|
|
|
|
|
219 |
echo '</select></td></tr>';
|
220 |
-
if (empty($intSite))
|
|
|
221 |
$intSite = get_option('wp-piwik_siteid');
|
222 |
$intAddJS = get_option('wp-piwik_addjs');
|
223 |
$strJavaScript = $this->call_API('SitesManager.getJavascriptTag');
|
224 |
-
if ($intAddJS)
|
225 |
-
|
226 |
-
echo '<tr><td>
|
227 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
228 |
}
|
229 |
-
|
230 |
-
|
231 |
-
</table>
|
232 |
-
<input type="hidden" name="action" value="update" />
|
233 |
-
<input type="hidden" name="page_options" value="wp-piwik_token,wp-piwik_url,wp-piwik_siteid,wp-piwik_addjs" />
|
234 |
-
<p class="submit">
|
235 |
-
|
236 |
-
</p>
|
237 |
-
</form>
|
238 |
-
</div>
|
239 |
</div>
|
240 |
-
<?php
|
241 |
}
|
242 |
}
|
243 |
|
244 |
-
if (class_exists('wp_piwik'))
|
245 |
$GLOBALS['wp_piwik'] = new wp_piwik();
|
246 |
-
|
|
6 |
|
7 |
Description: Adds Piwik stats to your dashboard menu and Piwik code to your wordpress footer.
|
8 |
|
9 |
+
Version: 0.3.1
|
10 |
Author: André Bräkling
|
11 |
Author URI: http://www.braekling.de
|
12 |
|
13 |
******************************************************************************************
|
14 |
+
Copyright (C) 2009 Andre Braekling (email: webmaster@braekling.de)
|
15 |
|
16 |
+
This program is free software: you can redistribute it and/or modify
|
17 |
+
it under the terms of the GNU General Public License as published by
|
18 |
+
the Free Software Foundation, either version 3 of the License, or
|
19 |
+
at your option) any later version.
|
20 |
|
21 |
+
This program is distributed in the hope that it will be useful,
|
22 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
23 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
24 |
+
GNU General Public License for more details.
|
25 |
|
26 |
+
You should have received a copy of the GNU General Public License
|
27 |
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
28 |
*******************************************************************************************/
|
29 |
|
30 |
class wp_piwik {
|
31 |
|
32 |
function __construct() {
|
33 |
+
$strLocale = get_locale();
|
34 |
+
if ( !empty( $strLocale ) ) {
|
35 |
+
$strMOfile = ABSPATH . 'wp-content/plugins/'.basename(dirname(__FILE__)).'/languages/wp-piwik-'.$strLocale.'.mo';
|
36 |
+
load_textdomain('wp-piwik', $strMOfile);
|
37 |
+
}
|
|
|
38 |
register_activation_hook(__FILE__, array($this, 'install'));
|
39 |
add_action('admin_menu', array($this, 'build_menu'));
|
40 |
+
add_filter('plugin_row_meta', array($this, 'set_plugin_meta'), 10, 2);
|
41 |
if (get_option('wp-piwik_addjs') == 1)
|
42 |
add_action('wp_footer', array($this, 'footer'));
|
43 |
}
|
44 |
+
|
45 |
function install() {
|
46 |
+
// not used
|
47 |
}
|
48 |
|
49 |
function footer() {
|
51 |
}
|
52 |
|
53 |
function build_menu() {
|
54 |
+
$intStatsPage = add_dashboard_page(
|
55 |
+
__('Piwik Statistics', 'wp-piwik'),
|
56 |
+
__('WP-Piwik', 'wp-piwik'),
|
57 |
+
8,
|
58 |
+
__FILE__,
|
59 |
+
array($this, 'show_stats')
|
60 |
+
);
|
61 |
+
add_action('admin_print_scripts-'.$intStatsPage, array($this, 'load_scripts'));
|
62 |
+
add_action('admin_head-'.$intStatsPage, array($this, 'add_admin_header'));
|
63 |
|
64 |
+
add_options_page(
|
65 |
+
__('WP-Piwik', 'wp-piwik'),
|
66 |
+
__('WP-Piwik', 'wp-piwik'),
|
67 |
+
8,
|
68 |
+
__FILE__,
|
69 |
+
array($this, 'show_settings')
|
70 |
+
);
|
71 |
}
|
72 |
|
73 |
+
function set_plugin_meta($strLinks, $strFile) {
|
74 |
$strPlugin = plugin_basename(__FILE__);
|
75 |
if ($strFile == $strPlugin)
|
76 |
+
return array_merge(
|
77 |
+
$strLinks,
|
78 |
+
array(
|
79 |
+
sprintf('<a href="options-general.php?page=%s">%s</a>', $strPlugin, __('Settings', 'wp-piwik'))
|
80 |
+
)
|
81 |
+
);
|
82 |
return $strLinks;
|
83 |
}
|
84 |
+
|
85 |
function load_scripts() {
|
86 |
+
wp_enqueue_script(
|
87 |
+
'wp-piwik',
|
88 |
+
$this->get_plugin_url().'js/wp-piwik.js',
|
89 |
+
array('jquery', 'admin-comments', 'postbox')
|
90 |
+
);
|
91 |
}
|
92 |
|
93 |
function add_admin_header() {
|
101 |
function call_API($strMethod, $strPeriod='', $strDate='', $intLimit='') {
|
102 |
$strKey = $strMethod.'_'.$strPeriod.'_'.$strDate.'_'.$intLimit;
|
103 |
if (empty($this->aryCache[$strKey])) {
|
104 |
+
$strToken = get_option('wp-piwik_token');
|
105 |
+
$strURL = get_option('wp-piwik_url');
|
106 |
$intSite = get_option('wp-piwik_siteid');
|
107 |
if (empty($strToken) || empty($strURL)) {
|
108 |
$this->aryCache[$key] = array(
|
111 |
);
|
112 |
return $this->aryCache[$strKey];
|
113 |
}
|
114 |
+
if (substr($strURL, -1, 1) != '/') $strURL .= '/';
|
115 |
+
$strURL .= '?module=API&method='.$strMethod;
|
116 |
+
$strURL .= '&idSite='.$intSite.'&period='.$strPeriod.'&date='.$strDate;
|
117 |
+
$strURL .= '&format=PHP&filter_limit='.$intLimit;
|
118 |
+
$strURL .= '&token_auth='.$strToken;
|
119 |
+
$strResult = file_get_contents($strURL);
|
120 |
+
$this->aryCache[$strKey] = unserialize($strResult);
|
121 |
}
|
122 |
return $this->aryCache[$strKey];
|
123 |
}
|
124 |
|
125 |
function create_dashboard_widget($strFile, $aryConfig) {
|
126 |
+
foreach ($aryConfig['params'] as $strParam)
|
127 |
if (!empty($strParam)) {
|
128 |
$strDesc .= $strParam.', ';
|
129 |
+
$strID .= '_'.$strParam;
|
130 |
}
|
|
|
131 |
$strFile = str_replace('.', '', $strFile);
|
132 |
+
$aryConf = array_merge($aryConfig, array(
|
133 |
+
'id' => $strFile.$strID,
|
134 |
+
'desc' => substr($strDesc, 0, -2)));
|
|
|
135 |
$strRoot = dirname(__FILE__);
|
136 |
if (file_exists($strRoot.DIRECTORY_SEPARATOR.'dashboard/'.$strFile.'.php'))
|
137 |
+
include($strRoot.DIRECTORY_SEPARATOR.'dashboard/'.$strFile.'.php');
|
138 |
}
|
139 |
|
140 |
function show_stats() {
|
141 |
$arySortOrder = get_user_option('meta-box-order_wppiwik');
|
142 |
$aryClosed = get_user_option('closedpostboxes_wppiwik');
|
143 |
if (empty($aryClosed)) $aryClosed = array();
|
|
|
144 |
$aryDashboard = array();
|
145 |
if (!$arySortOrder) {
|
146 |
// Set default configuration
|
147 |
$arySortOrder = array(
|
148 |
'side' => 'overview_day_yesterday,keywords_day_yesterday_10,websites_day_yesterday_10',
|
149 |
'normal' => 'visitors_day_last30,browsers_day_yesterday'
|
150 |
+
);
|
|
|
151 |
update_user_option($GLOBALS['current_user']->ID, 'meta-box-order_wppiwik', $arySortOrder);
|
152 |
}
|
153 |
foreach ($arySortOrder as $strCol => $strWidgets) {
|
164 |
);
|
165 |
}
|
166 |
}
|
167 |
+
/***************************************************************************/ ?>
|
168 |
+
<div class="wrap">
|
169 |
+
<div id="icon-post" class="icon32"><br /></div>
|
170 |
+
<h2><?php _e('Piwik Statistics', 'wp-piwik'); ?></h2>
|
171 |
+
<div id="dashboard-widgets-wrap">
|
172 |
+
<div id="dashboard-widgets" class="metabox-holder">
|
173 |
+
<div id="postbox-container" class="wp-piwik-side" style="width:300px; float:left;">
|
174 |
+
<div id="side-sortables" class="meta-box-sortables ui-sortable wp-piwik-sortables">
|
175 |
+
<?php /************************************************************************/
|
176 |
+
foreach ($aryDashboard['side'] as $strFile => $aryConfig)
|
177 |
+
$this->create_dashboard_widget($strFile, $aryConfig);
|
178 |
+
/***************************************************************************/ ?>
|
179 |
+
</div>
|
180 |
+
</div>
|
181 |
+
<div id="postbox-container" class="" style="width:520px; float:left; ">
|
182 |
+
<div id="wppiwik-widgets-main-content" class="has-sidebar-content">
|
183 |
+
<div id="normal-sortables" class="meta-box-sortables ui-sortable wp-piwik-sortables">
|
184 |
+
<?php /************************************************************************/
|
185 |
+
foreach ($aryDashboard['normal'] as $strFile => $aryConfig)
|
186 |
+
$this->create_dashboard_widget($strFile, $aryConfig);
|
187 |
+
wp_nonce_field('meta-box-order', 'meta-box-order-nonce', false);
|
188 |
+
wp_nonce_field('closedpostboxes', 'closedpostboxesnonce', false);
|
189 |
+
/***************************************************************************/ ?>
|
190 |
+
<div class="clear"></div>
|
191 |
+
</div>
|
192 |
+
</div>
|
193 |
+
</div>
|
194 |
+
</div>
|
195 |
</div>
|
196 |
</div>
|
197 |
+
<?php /************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
198 |
}
|
199 |
|
200 |
function show_settings() {
|
201 |
$strToken = get_option('wp-piwik_token');
|
202 |
$strURL = get_option('wp-piwik_url');
|
203 |
$intSite = get_option('wp-piwik_siteid');
|
204 |
+
/***************************************************************************/ ?>
|
205 |
<div class="wrap">
|
206 |
+
<h2><?php _e('WP-Piwik Settings', 'wp-piwik') ?></h2>
|
207 |
+
<div class="inside">
|
208 |
+
<form method="post" action="options.php">
|
209 |
+
<?php wp_nonce_field('update-options'); ?>
|
210 |
+
<table class="form-table">
|
211 |
+
<tr><td colspan="2"><h3><?php _e('Account settings', 'wp-piwik'); ?></h3></td></tr>
|
212 |
+
<tr>
|
213 |
+
<td><?php _e('Piwik URL', 'wp-piwik'); ?>:</td>
|
214 |
+
<td><input type="text" name="wp-piwik_url" id="wp-piwik_url" value="<?php echo $strURL; ?>" /></td>
|
215 |
+
</tr>
|
216 |
+
<tr>
|
217 |
+
<td><?php _e('Auth token', 'wp-piwik'); ?>:</td>
|
218 |
+
<td><input type="text" name="wp-piwik_token" id="wp-piwik_token" value="<?php echo $strToken; ?>" /></td>
|
219 |
+
</tr>
|
220 |
+
<tr><td colspan="2"><span class="setting-description">
|
221 |
+
<?php _e(
|
222 |
+
'To enable Piwik statistics, please enter your Piwik'.
|
223 |
+
' base URL (like http://mydomain.com/piwik) and your'.
|
224 |
+
' personal authentification token. You can get the token'.
|
225 |
+
' on the API page inside your Piwik interface. It looks'.
|
226 |
+
' like "1234a5cd6789e0a12345b678cd9012ef".'
|
227 |
+
, 'wp-piwik'
|
228 |
+
); ?>
|
229 |
+
</span></td></tr>
|
230 |
+
<?php /************************************************************************/
|
231 |
if (!empty($strToken) && !empty($strURL)) {
|
232 |
$aryData = $this->call_API('SitesManager.getSitesWithAtLeastViewAccess');
|
233 |
if (empty($aryData)) {
|
234 |
+
echo '<tr><td colspan="2"><p><strong>'.__('An error occured', 'wp-piwik').': </strong>'.
|
235 |
+
__('Please check URL and auth token. You need at least view access to one site.', 'wp-piwik').
|
236 |
+
'</p></td></tr>';
|
237 |
} elseif ($aryData['result'] == 'error') {
|
238 |
+
echo '<tr><td colspan="2"><p><strong>'.__('An error occured', 'wp-piwik').
|
239 |
+
': </strong>'.$aryData['message'].'</p></td></tr>';
|
240 |
+
} else {
|
241 |
+
echo '<tr><td>'.__('Choose site', 'wp-piwik').
|
242 |
+
':</td><td><select name="wp-piwik_siteid" id="wp-piwik_siteid">';
|
243 |
+
foreach ($aryData as $arySite)
|
244 |
+
echo '<option value="'.$arySite['idsite'].
|
245 |
+
'"'.($arySite['idsite']==$intSite?' selected':'').
|
246 |
+
'>'.htmlentities($arySite['name'], ENT_QUOTES, 'utf-8').
|
247 |
+
'</option>';
|
248 |
echo '</select></td></tr>';
|
249 |
+
if (empty($intSite))
|
250 |
+
update_option('wp-piwik_siteid', $aryData[0]['idsite']);
|
251 |
$intSite = get_option('wp-piwik_siteid');
|
252 |
$intAddJS = get_option('wp-piwik_addjs');
|
253 |
$strJavaScript = $this->call_API('SitesManager.getJavascriptTag');
|
254 |
+
if ($intAddJS)
|
255 |
+
update_option('wp-piwik_jscode', $strJavaScript);
|
256 |
+
echo '<tr><td>JavaScript:</td><td><textarea readonly rows="17" cols="80">'.
|
257 |
+
($strJavaScript).'</textarea></td></tr>';
|
258 |
+
echo '<tr><td>'.__('Add script to wp_footer()', 'wp-piwik').
|
259 |
+
':</td><td><input type="checkbox" value="1" name="wp-piwik_addjs" '.
|
260 |
+
($intAddJS?' checked':'').'/></td></tr>';
|
261 |
+
echo '<tr><td colspan="2"><span class="setting-description">'.
|
262 |
+
__('If your template uses wp_footer(), WP-Piwik can automatically'.
|
263 |
+
' add the Piwik javascript code to your blog.', 'wp-piwik').
|
264 |
+
'</span></td></tr>';
|
265 |
}
|
266 |
+
}
|
267 |
+
/***************************************************************************/ ?>
|
268 |
+
</table>
|
269 |
+
<input type="hidden" name="action" value="update" />
|
270 |
+
<input type="hidden" name="page_options" value="wp-piwik_token,wp-piwik_url,wp-piwik_siteid,wp-piwik_addjs" />
|
271 |
+
<p class="submit">
|
272 |
+
<input type="submit" name="Submit" value="<?php _e('Save settings', 'wp-piwik') ?>" />
|
273 |
+
</p>
|
274 |
+
</form>
|
275 |
+
</div>
|
276 |
</div>
|
277 |
+
<?php /************************************************************************/
|
278 |
}
|
279 |
}
|
280 |
|
281 |
+
if (class_exists('wp_piwik'))
|
282 |
$GLOBALS['wp_piwik'] = new wp_piwik();
|
283 |
+
|
284 |
+
/* EOF */
|