Version Description
- array-multisort bug fix. Props
Download this release
Release Info
Developer | m_uysl |
Plugin | Yandex Metrica |
Version | 1.4.1 |
Comparing to | |
See all releases |
Code changes from version 1.4 to 1.4.1
- README.md +4 -0
- readme.txt +4 -1
- templates/dashboard-charts-js.php +4 -1
- yandex-metrica.php +9 -5
README.md
CHANGED
@@ -63,6 +63,10 @@ Extract the zip file and just drop the contents in the `wp-content/plugins/` dir
|
|
63 |
|
64 |
## Changelog ##
|
65 |
|
|
|
|
|
|
|
|
|
66 |
### 1.4 ###
|
67 |
- Text Domain changed
|
68 |
- Nonces added to settings page
|
63 |
|
64 |
## Changelog ##
|
65 |
|
66 |
+
### 1.4.1 ###
|
67 |
+
- array-multisort bug fix. Props Николай Астраханцев
|
68 |
+
|
69 |
+
|
70 |
### 1.4 ###
|
71 |
- Text Domain changed
|
72 |
- Nonces added to settings page
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Contributors: m_uysl
|
|
4 |
Tags: yandex,metrica,stats,statistics,tools,analytics,analytics tool,metrika
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 4.6
|
7 |
-
Stable tag: 1.4
|
8 |
License: GPLv2 (or later)
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -63,6 +63,9 @@ Extract the zip file and just drop the contents in the `wp-content/plugins/` dir
|
|
63 |
|
64 |
== Changelog ==
|
65 |
|
|
|
|
|
|
|
66 |
= 1.4 =
|
67 |
- Text Domain changed
|
68 |
- Nonces added to settings page
|
4 |
Tags: yandex,metrica,stats,statistics,tools,analytics,analytics tool,metrika
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 4.6
|
7 |
+
Stable tag: 1.4.1
|
8 |
License: GPLv2 (or later)
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
63 |
|
64 |
== Changelog ==
|
65 |
|
66 |
+
= 1.4.1 =
|
67 |
+
- array-multisort bug fix. Props Николай Астраханцев
|
68 |
+
|
69 |
= 1.4 =
|
70 |
- Text Domain changed
|
71 |
- Nonces added to settings page
|
templates/dashboard-charts-js.php
CHANGED
@@ -2,6 +2,9 @@
|
|
2 |
|
3 |
<script type="text/javascript">
|
4 |
jQuery(document).ready(function ($) {
|
|
|
|
|
|
|
5 |
$('#metrica-graph').highcharts({
|
6 |
chart : {
|
7 |
type: 'line'
|
@@ -85,8 +88,8 @@
|
|
85 |
});
|
86 |
});
|
87 |
|
|
|
88 |
|
89 |
});
|
90 |
|
91 |
-
|
92 |
</script>
|
2 |
|
3 |
<script type="text/javascript">
|
4 |
jQuery(document).ready(function ($) {
|
5 |
+
<?php if( ! is_array( $statical_data ) ) { ?>
|
6 |
+
$('#metrica-graph').html("<p><?php _e('Sorry, couldn\'t draw graph for selected period, please try different time period.','yandex-metrica');?></p>");
|
7 |
+
<?php } else { ?>
|
8 |
$('#metrica-graph').highcharts({
|
9 |
chart : {
|
10 |
type: 'line'
|
88 |
});
|
89 |
});
|
90 |
|
91 |
+
<?php } ?>
|
92 |
|
93 |
});
|
94 |
|
|
|
95 |
</script>
|
yandex-metrica.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Yandex Metrica
|
|
4 |
Plugin URI: http://uysalmustafa.com/plugins/yandex-metrica
|
5 |
Description: Best metrica plugin for the use Yandex Metrica in your WordPress site.
|
6 |
Author: Mustafa Uysal
|
7 |
-
Version: 1.4
|
8 |
Text Domain: yandex-metrica
|
9 |
Domain Path: /languages/
|
10 |
Author URI: http://uysalmustafa.com
|
@@ -205,10 +205,14 @@ class WP_Yandex_Metrica extends WP_Stack_Plugin {
|
|
205 |
public function dashboard_chart_js() {
|
206 |
wp_enqueue_script( 'jquery' );
|
207 |
$statical_data = self::$metrica_api->get_counter_statistics( $this->options["counter_id"], $this->start_date, $this->end_date, "data" );
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
|
|
|
|
|
|
|
|
212 |
include( dirname( __FILE__ ) . '/templates/dashboard-charts-js.php' );
|
213 |
}
|
214 |
|
4 |
Plugin URI: http://uysalmustafa.com/plugins/yandex-metrica
|
5 |
Description: Best metrica plugin for the use Yandex Metrica in your WordPress site.
|
6 |
Author: Mustafa Uysal
|
7 |
+
Version: 1.4.1
|
8 |
Text Domain: yandex-metrica
|
9 |
Domain Path: /languages/
|
10 |
Author URI: http://uysalmustafa.com
|
205 |
public function dashboard_chart_js() {
|
206 |
wp_enqueue_script( 'jquery' );
|
207 |
$statical_data = self::$metrica_api->get_counter_statistics( $this->options["counter_id"], $this->start_date, $this->end_date, "data" );
|
208 |
+
|
209 |
+
if ( is_array( $statical_data ) ) {
|
210 |
+
foreach ( $statical_data as $key => $row ) {
|
211 |
+
$days[ $key ] = $row['date'];
|
212 |
+
}
|
213 |
+
array_multisort( $days, SORT_ASC, $statical_data );
|
214 |
+
}
|
215 |
+
|
216 |
include( dirname( __FILE__ ) . '/templates/dashboard-charts-js.php' );
|
217 |
}
|
218 |
|