Google Analytics - Version 1.1.1

Version Description

  • 8-Jan-2017
  • Fix : Changed cURL query handling, to prevent requests to google from returning errors.
Download this release

Release Info

Developer amribrahim
Plugin Icon 128x128 Google Analytics
Version 1.1.1
Comparing to
See all releases

Code changes from version 1.1 to 1.1.1

core/callURL.class.php CHANGED
@@ -70,16 +70,18 @@ class callURL{
70
  $this->callOptions[CURLOPT_SSL_VERIFYPEER] = false;
71
 
72
  if ($this->method === "POST"){
 
 
73
  if ($this->jsonPost === true){
74
  $this->callOptions[CURLOPT_HTTPHEADER] = array("Content-Type: application/json; charset=UTF-8");
 
 
 
75
  }
76
- $this->callOptions[CURLOPT_URL] = $this->url;
77
- $this->callOptions[CURLOPT_POST] = true;
78
- $this->callOptions[CURLOPT_POSTFIELDS] = $this->query;
79
  }else{
80
  $query = "";
81
  if (is_array($this->query) && !empty($this->query)) {
82
- $query = "?".http_build_query($this->query);
83
  }
84
  $this->callOptions[CURLOPT_URL] = $this->url.$query;
85
  }
70
  $this->callOptions[CURLOPT_SSL_VERIFYPEER] = false;
71
 
72
  if ($this->method === "POST"){
73
+ $this->callOptions[CURLOPT_URL] = $this->url;
74
+ $this->callOptions[CURLOPT_POST] = true;
75
  if ($this->jsonPost === true){
76
  $this->callOptions[CURLOPT_HTTPHEADER] = array("Content-Type: application/json; charset=UTF-8");
77
+ $this->callOptions[CURLOPT_POSTFIELDS] = $this->query;
78
+ }else{
79
+ $this->callOptions[CURLOPT_POSTFIELDS] = http_build_query($this->query, '', '&');
80
  }
 
 
 
81
  }else{
82
  $query = "";
83
  if (is_array($this->query) && !empty($this->query)) {
84
+ $query = "?".http_build_query($this->query, '', '&');
85
  }
86
  $this->callOptions[CURLOPT_URL] = $this->url.$query;
87
  }
lara-google-analytics.php CHANGED
@@ -4,14 +4,14 @@
4
  Plugin Name: Google Analytics
5
  Plugin URI: https://www.whmcsadmintheme.com
6
  Description: Easily connects your Google Analytics account with WordPress.
7
- Version: 1.1
8
  Author: Amr M. Ibrahim
9
  Author URI: https://www.whmcsadmintheme.com
10
  License: GPL2
11
  */
12
 
13
- define ("lrgawidget_plugin_version", "1.1");
14
- define ("lrgawidget_plugin_scripts_version", "15");
15
  define ("lrgawidget_plugin_prefiex", "lrgalite-");
16
  define ("lrgawidget_plugin_dist_dir", plugin_dir_url( __FILE__ ).'dist/');
17
  define ("lrgawidget_plugin_plugins_dir", plugin_dir_url( __FILE__ ).'dist/plugins/');
4
  Plugin Name: Google Analytics
5
  Plugin URI: https://www.whmcsadmintheme.com
6
  Description: Easily connects your Google Analytics account with WordPress.
7
+ Version: 1.1.1
8
  Author: Amr M. Ibrahim
9
  Author URI: https://www.whmcsadmintheme.com
10
  License: GPL2
11
  */
12
 
13
+ define ("lrgawidget_plugin_version", "1.1.1");
14
+ define ("lrgawidget_plugin_scripts_version", "16");
15
  define ("lrgawidget_plugin_prefiex", "lrgalite-");
16
  define ("lrgawidget_plugin_dist_dir", plugin_dir_url( __FILE__ ).'dist/');
17
  define ("lrgawidget_plugin_plugins_dir", plugin_dir_url( __FILE__ ).'dist/plugins/');
readme.txt CHANGED
@@ -3,7 +3,7 @@ Tags: analyticator, analytics, analytics dashboard, better google analytics, ana
3
  Contributors: amribrahim
4
  Requires at least: 4.0
5
  Tested up to: 4.7
6
- Stable tag: 1.1
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -65,4 +65,8 @@ Adds a full width Google Analytics dashboard widget for WordPress admin interfac
65
  * Fix : Combining Javascript and CSS files into 2 files.
66
  * Fix : Checking for PHP version upon plugin activation.
67
  * Fix : Several minor improvements.
68
- * New : Code refactoring.
 
 
 
 
3
  Contributors: amribrahim
4
  Requires at least: 4.0
5
  Tested up to: 4.7
6
+ Stable tag: 1.1.1
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
65
  * Fix : Combining Javascript and CSS files into 2 files.
66
  * Fix : Checking for PHP version upon plugin activation.
67
  * Fix : Several minor improvements.
68
+ * New : Code refactoring.
69
+
70
+ = 1.1.1 =
71
+ * 8-Jan-2017
72
+ * Fix : Changed cURL query handling, to prevent requests to google from returning errors.