Version Description
- Added [analytics-counter] shortcode so you can display the page view counter widget anywhere
Download this release
Release Info
Developer | grimmdude |
Plugin | Google Analyticator |
Version | 6.4.9.1 |
Comparing to | |
See all releases |
Code changes from version 6.4.9 to 6.4.9.1
- google-analyticator.php +20 -4
- google-analytics-stats-widget.php +9 -3
- google-analytics-summary-widget.php +2 -2
- readme.txt +6 -3
google-analyticator.php
CHANGED
@@ -491,7 +491,7 @@ if(!$addons){?>
|
|
491 |
<p>3- Have a great day!</p>
|
492 |
<h3 style="text-align:center">Show off your analytics</h3>
|
493 |
<p>Use short code <b>[analytics]</b> anywhere on your site to show your analytics publicly.</p>
|
494 |
-
|
495 |
</div>
|
496 |
<?php }?>
|
497 |
<div style="margin-right: 320px;">
|
@@ -1324,15 +1324,31 @@ function add_ga_admin_footer(){
|
|
1324 |
*/
|
1325 |
|
1326 |
//[analytics]
|
1327 |
-
function ga_analyticator_shortcode( $atts ){
|
1328 |
# Include the Google Analytics Summary widget
|
1329 |
require_once('google-analytics-summary-widget.php');
|
1330 |
-
|
|
|
|
|
1331 |
// Wrap it with these divs to mimic the admin dashboard widget structure.
|
1332 |
echo '<div id="google-analytics-summary"><div class="inside">';
|
1333 |
$google_analytics_summary->widget();
|
1334 |
echo '</div></div>';
|
1335 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1336 |
}
|
1337 |
|
1338 |
add_shortcode( 'analytics', 'ga_analyticator_shortcode' );
|
|
|
|
491 |
<p>3- Have a great day!</p>
|
492 |
<h3 style="text-align:center">Show off your analytics</h3>
|
493 |
<p>Use short code <b>[analytics]</b> anywhere on your site to show your analytics publicly.</p>
|
494 |
+
<p>Use short code <b>[analytics-counter]</b> anywhere on your site to display the page view counter widget.</p>
|
495 |
</div>
|
496 |
<?php }?>
|
497 |
<div style="margin-right: 320px;">
|
1324 |
*/
|
1325 |
|
1326 |
//[analytics]
|
1327 |
+
function ga_analyticator_shortcode( $atts ) {
|
1328 |
# Include the Google Analytics Summary widget
|
1329 |
require_once('google-analytics-summary-widget.php');
|
1330 |
+
ob_start();
|
1331 |
+
|
1332 |
+
$google_analytics_summary = new GoogleAnalyticsSummary(array('shortcode' => TRUE));
|
1333 |
// Wrap it with these divs to mimic the admin dashboard widget structure.
|
1334 |
echo '<div id="google-analytics-summary"><div class="inside">';
|
1335 |
$google_analytics_summary->widget();
|
1336 |
echo '</div></div>';
|
1337 |
+
|
1338 |
+
return ob_get_clean();
|
1339 |
+
}
|
1340 |
+
|
1341 |
+
//[analytics]
|
1342 |
+
function ga_analyticator_counter_shortcode( $atts ) {
|
1343 |
+
# Include Google Analytics Stats widget
|
1344 |
+
require_once('google-analytics-stats-widget.php');
|
1345 |
+
ob_start();
|
1346 |
+
|
1347 |
+
$google_analytics_widget = new GoogleStatsWidget(array('shortcode' => TRUE));
|
1348 |
+
|
1349 |
+
return ob_get_clean();
|
1350 |
}
|
1351 |
|
1352 |
add_shortcode( 'analytics', 'ga_analyticator_shortcode' );
|
1353 |
+
add_shortcode( 'analytics-counter', 'ga_analyticator_counter_shortcode' );
|
1354 |
+
|
google-analytics-stats-widget.php
CHANGED
@@ -8,10 +8,14 @@
|
|
8 |
**/
|
9 |
class GoogleStatsWidget extends WP_Widget
|
10 |
{
|
11 |
-
function GoogleStatsWidget() {
|
12 |
$widget_ops = array('classname' => 'widget_google_stats', 'description' => __("Displays Stat Info From Google Analytics", 'google-analyticator') );
|
13 |
$control_ops = array('width' => 400, 'height' => 400);
|
14 |
$this->WP_Widget('googlestats', __('Google Analytics Stats', 'google-analyticator'), $widget_ops, $control_ops);
|
|
|
|
|
|
|
|
|
15 |
}
|
16 |
|
17 |
function widget($args, $instance) {
|
@@ -143,7 +147,7 @@ class GoogleStatsWidget extends WP_Widget
|
|
143 |
**/
|
144 |
function beginWidget($font_color = '000', $widget_background_color = 'FFF')
|
145 |
{
|
146 |
-
echo '<table style="width:auto!important;border-width:2px;border-color:#' . $font_color . ';border-style:solid;background:#' . $widget_background_color . ';"><tr>';
|
147 |
}
|
148 |
|
149 |
/**
|
@@ -179,7 +183,9 @@ class GoogleStatsWidget extends WP_Widget
|
|
179 |
echo '</tr></table>';
|
180 |
|
181 |
// The following is used to displayed the "Powered By Google Anayltics" text.
|
182 |
-
|
|
|
|
|
183 |
}
|
184 |
|
185 |
/**
|
8 |
**/
|
9 |
class GoogleStatsWidget extends WP_Widget
|
10 |
{
|
11 |
+
function GoogleStatsWidget($options = array('shortcode' => FALSE)) {
|
12 |
$widget_ops = array('classname' => 'widget_google_stats', 'description' => __("Displays Stat Info From Google Analytics", 'google-analyticator') );
|
13 |
$control_ops = array('width' => 400, 'height' => 400);
|
14 |
$this->WP_Widget('googlestats', __('Google Analytics Stats', 'google-analyticator'), $widget_ops, $control_ops);
|
15 |
+
|
16 |
+
if ($options['shortcode']) {
|
17 |
+
$this->widget();
|
18 |
+
}
|
19 |
}
|
20 |
|
21 |
function widget($args, $instance) {
|
147 |
**/
|
148 |
function beginWidget($font_color = '000', $widget_background_color = 'FFF')
|
149 |
{
|
150 |
+
echo '<table style="width:auto!important;border-width:2px;border-color:#' . $font_color . ';border-style:solid;background:#' . $widget_background_color . ';margin-bottom:0;"><tr>';
|
151 |
}
|
152 |
|
153 |
/**
|
183 |
echo '</tr></table>';
|
184 |
|
185 |
// The following is used to displayed the "Powered By Google Anayltics" text.
|
186 |
+
if (get_option(key_ga_show_ad) == '1') {
|
187 |
+
echo '<div style="font-size:9px;color:#666666;margin-top:0px;font-family:Verdana;">Powered By <a href="https://wordpress.org/plugins/google-analyticator/" title="Google Analyticator for Wordpress" style="text-decoration:none;" target="_blank"><img src="' . plugins_url('/google-analyticator/ga_logo.png') . '" alt="Google Analytics" style="border:0px;position:relative;top:4px;" /></a></div></div>';
|
188 |
+
}
|
189 |
}
|
190 |
|
191 |
/**
|
google-analytics-summary-widget.php
CHANGED
@@ -13,7 +13,7 @@ class GoogleAnalyticsSummary
|
|
13 |
/**
|
14 |
* Start the process of including the widget
|
15 |
**/
|
16 |
-
function GoogleAnalyticsSummary($
|
17 |
{
|
18 |
add_action('wp_dashboard_setup', array(
|
19 |
$this,
|
@@ -44,7 +44,7 @@ class GoogleAnalyticsSummary
|
|
44 |
|
45 |
add_action( 'wp_ajax_ga_stats_widget', array( $this, 'ajaxWidget' ) );
|
46 |
|
47 |
-
if ($shortcode) {
|
48 |
add_action( 'wp_ajax_nopriv_ga_stats_widget', array( $this, 'ajaxWidget' ) );
|
49 |
}
|
50 |
}
|
13 |
/**
|
14 |
* Start the process of including the widget
|
15 |
**/
|
16 |
+
function GoogleAnalyticsSummary($options = array('shortcode' => FALSE))
|
17 |
{
|
18 |
add_action('wp_dashboard_setup', array(
|
19 |
$this,
|
44 |
|
45 |
add_action( 'wp_ajax_ga_stats_widget', array( $this, 'ajaxWidget' ) );
|
46 |
|
47 |
+
if ($options['shortcode']) {
|
48 |
add_action( 'wp_ajax_nopriv_ga_stats_widget', array( $this, 'ajaxWidget' ) );
|
49 |
}
|
50 |
}
|
readme.txt
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
=== Google Analyticator ===
|
2 |
-
Contributors:
|
3 |
Tags: google analytics plugin, stats, statistics, google, analytics, dashboard, google analytics, tracking, widget, marketing,pageviews,visits, web stats, javascript
|
4 |
Requires at least: 3.2
|
5 |
-
Tested up to: 4.2
|
6 |
-
Stable tag: 6.4.9
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -74,6 +74,9 @@ For any support issues, please use the official WordPress support forums.
|
|
74 |
|
75 |
== Changelog ==
|
76 |
|
|
|
|
|
|
|
77 |
= 6.4.9 =
|
78 |
* Added [analytics] shortcode so you can add show off your analytics publicly
|
79 |
|
1 |
=== Google Analyticator ===
|
2 |
+
Contributors: noahkagan
|
3 |
Tags: google analytics plugin, stats, statistics, google, analytics, dashboard, google analytics, tracking, widget, marketing,pageviews,visits, web stats, javascript
|
4 |
Requires at least: 3.2
|
5 |
+
Tested up to: 4.2.2
|
6 |
+
Stable tag: 6.4.9.1
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
74 |
|
75 |
== Changelog ==
|
76 |
|
77 |
+
= 6.4.9.1 =
|
78 |
+
* Added [analytics-counter] shortcode so you can display the page view counter widget anywhere
|
79 |
+
|
80 |
= 6.4.9 =
|
81 |
* Added [analytics] shortcode so you can add show off your analytics publicly
|
82 |
|