WP Statistics - Version 12.4.3

Version Description

  • Disabled the welcome page and Travod widget.
Download this release

Release Info

Developer mostafa.s1990
Plugin Icon 128x128 WP Statistics
Version 12.4.3
Comparing to
See all releases

Code changes from version 12.4.2 to 12.4.3

composer.lock CHANGED
@@ -605,6 +605,7 @@
605
  "user agent",
606
  "user-agent"
607
  ],
 
608
  "time": "2016-04-23T18:18:10+00:00"
609
  },
610
  {
@@ -669,6 +670,7 @@
669
  "Wurfl",
670
  "cache"
671
  ],
 
672
  "time": "2016-08-06T11:25:21+00:00"
673
  },
674
  {
605
  "user agent",
606
  "user-agent"
607
  ],
608
+ "abandoned": true,
609
  "time": "2016-04-23T18:18:10+00:00"
610
  },
611
  {
670
  "Wurfl",
671
  "cache"
672
  ],
673
+ "abandoned": true,
674
  "time": "2016-08-06T11:25:21+00:00"
675
  },
676
  {
includes/classes/class-wp-statistics-admin.php CHANGED
@@ -70,10 +70,7 @@ class WP_Statistics_Admin {
70
  add_action( 'admin_menu', 'WP_Statistics_Welcome::menu' );
71
  //add_action( 'upgrader_process_complete', 'WP_Statistics_Welcome::do_welcome', 10, 2 );
72
  add_action( 'admin_init', 'WP_Statistics_Welcome::init' );
73
-
74
- // Initial the Suggestions class
75
- new WP_Statistics_Suggestions();
76
-
77
  // Runs some scripts at the end of the admin panel inside the body tag
78
  add_action( 'admin_footer', array( $this, 'admin_footer_scripts' ) );
79
  }
70
  add_action( 'admin_menu', 'WP_Statistics_Welcome::menu' );
71
  //add_action( 'upgrader_process_complete', 'WP_Statistics_Welcome::do_welcome', 10, 2 );
72
  add_action( 'admin_init', 'WP_Statistics_Welcome::init' );
73
+
 
 
 
74
  // Runs some scripts at the end of the admin panel inside the body tag
75
  add_action( 'admin_footer', array( $this, 'admin_footer_scripts' ) );
76
  }
includes/classes/class-wp-statistics-suggestions.php DELETED
@@ -1,527 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class WP_Statistics_Suggestions
5
- */
6
- class WP_Statistics_Suggestions {
7
- /**
8
- * WP_Statistics_Suggestions constructor.
9
- */
10
- public function __construct() {
11
- global $WP_Statistics;
12
-
13
- // Check the suggestion is enabled.
14
- if ( ! $WP_Statistics->get_option( 'disable_suggestion_nag', false ) ) {
15
- $include_language = array(
16
- 'en_US',
17
- 'en_AU',
18
- 'en_CA',
19
- 'en_NZ',
20
- 'zh_SG',
21
- 'ko_KR',
22
- 'ja',
23
- 'hu_HU',
24
- 'nl_BE',
25
- 'da_DK',
26
- 'fi',
27
- 'sv_SE',
28
- 'fr_FR',
29
- 'de_DE',
30
- 'is_IS',
31
- 'ga',
32
- 'it_IT',
33
- 'lb_LU',
34
- 'fy',
35
- 'pap',
36
- 'nn_NO',
37
- 'nb_NO',
38
- 'nn_NO',
39
- 'pl_PL',
40
- 'pt_PT',
41
- 'rup_MK',
42
- 'es_ES',
43
- 'fr-ch'
44
- );
45
-
46
- if ( array_search( get_locale(), $include_language ) !== false ) {
47
- add_action( 'wp_statistics_after_title', array( $this, 'travod_widget' ) );
48
- }
49
- }
50
- }
51
-
52
- public function travod_widget() {
53
- if ( isset( $_POST['full_name'] ) and isset( $_POST['email'] ) ) {
54
- global $WP_Statistics;
55
- $languages = array();
56
-
57
- foreach ( $this->get_suggestion() as $item ) {
58
- $languages[] = $item['language'];
59
- }
60
-
61
- // Build the request parameter
62
- $args = array(
63
- 'headers' => array(
64
- 'Content-Type' => 'application/json',
65
- ),
66
- 'body' => json_encode( array(
67
- 'website' => get_bloginfo( 'url' ),
68
- 'full_name' => $_POST['full_name'],
69
- 'email' => $_POST['email'],
70
- 'languages' => implode( $languages, ', ' ),
71
- 'ip_address' => $WP_Statistics->get_IP(),
72
- 'timestamp' => time(),
73
- )
74
- )
75
- );
76
-
77
- // Send data to url
78
- $response = wp_remote_post( 'https://hooks.zapier.com/hooks/catch/3049993/aqqp46/', $args );
79
-
80
- if ( ! is_wp_error( $response ) ) {
81
- // Disable the suggestion
82
- $WP_Statistics->update_option( 'disable_suggestion_nag', true );
83
- $WP_Statistics->update_option( 'admin_notices', false );
84
-
85
- $link = "<script>window.location = 'https://www.travod.com/thanks/';</script>";
86
- echo $link;
87
- }
88
- }
89
-
90
- $base_url = $this->get_base_url( get_bloginfo( 'url' ) );
91
- $current_user_fullname = $this->get_current_user_fullname();
92
-
93
- include( WP_Statistics::$reg['plugin-dir'] . "includes/templates/suggestions/travod.php" );
94
- }
95
-
96
- public function get_base_url( $url ) {
97
- if ( substr( $url, 0, 8 ) == 'https://' ) {
98
- $url = substr( $url, 8 );
99
- }
100
- if ( substr( $url, 0, 7 ) == 'http://' ) {
101
- $url = substr( $url, 7 );
102
- }
103
- if ( substr( $url, 0, 4 ) == 'www.' ) {
104
- $url = substr( $url, 4 );
105
- }
106
- if ( strpos( $url, '/' ) !== false ) {
107
- $explode = explode( '/', $url );
108
- $url = $explode['0'];
109
- }
110
-
111
- return $url;
112
- }
113
-
114
- public function get_current_user_fullname() {
115
- $user = wp_get_current_user();
116
-
117
- if ( isset( $user->user_firstname ) and isset( $user->user_lastname ) ) {
118
- return $user->user_firstname . ' ' . $user->user_lastname;
119
- } else {
120
- return $user->data->display_name;
121
- }
122
- }
123
-
124
- private function get_domain_info( $domain_name ) {
125
- $domains = array(
126
- 'google.me' => array( 'country' => 'Montenegro', 'language' => 'Albanian', 'code' => 'sq' ),
127
- 'google.al' => array( 'country' => 'Albania', 'language' => 'Albanian', 'code' => 'sq' ),
128
- 'google.com.et' => array( 'country' => 'Ethiopia', 'language' => 'Amharic', 'code' => 'am' ),
129
- 'google.ae' => array( 'country' => 'United Arab Emirates', 'language' => 'Arabic', 'code' => 'ar' ),
130
- 'google.co.ma' => array( 'country' => 'Morocco', 'language' => 'Arabic', 'code' => 'ar' ),
131
- 'google.com.sa' => array( 'country' => 'Saudi Arabia', 'language' => 'Arabic', 'code' => 'ar' ),
132
- 'google.so' => array( 'country' => 'Somalia', 'language' => 'Arabic', 'code' => 'ar' ),
133
- 'google.tn' => array( 'country' => 'Tunisia', 'language' => 'Arabic', 'code' => 'ar' ),
134
- 'google.com.bh' => array( 'country' => 'Bahrain', 'language' => 'Arabic', 'code' => 'ar' ),
135
- 'google.dj' => array( 'country' => 'Djibouti', 'language' => 'Arabic', 'code' => 'ar' ),
136
- 'google.dz' => array( 'country' => 'Algeria', 'language' => 'Arabic', 'code' => 'ar' ),
137
- 'google.com.eg' => array( 'country' => 'Egypt', 'language' => 'Arabic', 'code' => 'ar' ),
138
- 'google.iq' => array( 'country' => 'Iraq', 'language' => 'Arabic', 'code' => 'ar' ),
139
- 'google.jo' => array( 'country' => 'Jordan', 'language' => 'Arabic', 'code' => 'ar' ),
140
- 'google.com.kw' => array( 'country' => 'Kuwait', 'language' => 'Arabic', 'code' => 'ar' ),
141
- 'google.com.lb' => array( 'country' => 'Lebanon', 'language' => 'Arabic', 'code' => 'ar' ),
142
- 'google.com.ly' => array( 'country' => 'Libya', 'language' => 'Arabic', 'code' => 'ar' ),
143
- 'google.com.om' => array( 'country' => 'Oman', 'language' => 'Arabic', 'code' => 'ar' ),
144
- 'google.ps' => array( 'country' => 'Palestine', 'language' => 'Arabic', 'code' => 'ar' ),
145
- 'google.com.qa' => array( 'country' => 'Qatar', 'language' => 'Arabic', 'code' => 'ar' ),
146
- 'google.td' => array( 'country' => 'Chad', 'language' => 'Arabic', 'code' => 'ar' ),
147
- 'google.am' => array( 'country' => 'Armenia', 'language' => 'Armenian', 'code' => 'hy' ),
148
- 'google.az' => array( 'country' => 'Azerbaijan', 'language' => 'Azerbaijani', 'code' => 'az' ),
149
- 'google.by' => array( 'country' => 'Belarus', 'language' => 'Belarusian', 'code' => 'be' ),
150
- 'google.com.bd' => array( 'country' => 'Bangladesh', 'language' => 'Bengali', 'code' => 'bn' ),
151
- 'google.ba' => array( 'country' => 'Bosnia and Herzegovina', 'language' => 'Bosnian', 'code' => 'bs' ),
152
- 'google.bg' => array( 'country' => 'Bulgaria', 'language' => 'Bulgarian', 'code' => 'bg' ),
153
- 'google.mk' => array( 'country' => 'Macedonia', 'language' => 'Bulgarian', 'code' => 'bg' ),
154
- 'google.com.mm' => array( 'country' => 'Myanmar', 'language' => 'Burmese', 'code' => 'my' ),
155
- 'google.com.hk' => array( 'country' => 'Hong Kong', 'language' => 'Cantonese', 'code' => 'zh' ),
156
- 'google.ad' => array( 'country' => 'Andorra', 'language' => 'Catalan', 'code' => 'ca' ),
157
- 'google.cat' => array( 'country' => 'Catalan Countries', 'language' => 'Catalan', 'code' => 'ca' ),
158
- 'google.hr' => array( 'country' => 'Croatia', 'language' => 'Croatian', 'code' => 'hr' ),
159
- 'google.cz' => array( 'country' => 'Czech Republic', 'language' => 'Czech', 'code' => 'cs' ),
160
- 'google.dk' => array( 'country' => 'Denmark', 'language' => 'Danish', 'code' => 'da' ),
161
- 'google.mv' => array( 'country' => 'Maldives', 'language' => 'Dhivehi', 'code' => 'dv' ),
162
- 'google.sr' => array( 'country' => 'Suriname', 'language' => 'Dutch', 'code' => 'nl' ),
163
- 'google.be' => array( 'country' => 'Belgium', 'language' => 'Dutch', 'code' => 'nl' ),
164
- 'google.nl' => array( 'country' => 'Netherlands', 'language' => 'Dutch', 'code' => 'nl' ),
165
- 'google.bt' => array( 'country' => 'Bhutan', 'language' => 'Dzongkha', 'code' => 'dz' ),
166
- 'google.com.ag' => array( 'country' => 'Antigua and Barbuda', 'language' => 'English', 'code' => 'en' ),
167
- 'google.fm' => array(
168
- 'country' => 'Federated States of Micronesia',
169
- 'language' => 'English',
170
- 'code' => 'en'
171
- ),
172
- 'google.com.lc' => array( 'country' => 'Saint Lucia', 'language' => 'English', 'code' => 'en' ),
173
- 'google.com.ng' => array( 'country' => 'Nigeria', 'language' => 'English', 'code' => 'en' ),
174
- 'google.com.sb' => array( 'country' => 'Solomon Islands', 'language' => 'English', 'code' => 'en' ),
175
- 'google.sc' => array( 'country' => 'Seychelles', 'language' => 'English', 'code' => 'en' ),
176
- 'google.com.sg' => array( 'country' => 'Singapore', 'language' => 'English', 'code' => 'en' ),
177
- 'google.to' => array( 'country' => 'Tonga', 'language' => 'English', 'code' => 'en' ),
178
- 'google.tt' => array( 'country' => 'Trinidad and Tobago', 'language' => 'English', 'code' => 'en' ),
179
- 'google.co.ug' => array( 'country' => 'Uganda', 'language' => 'English', 'code' => 'en' ),
180
- 'google.co.uk' => array( 'country' => 'United Kingdom', 'language' => 'English', 'code' => 'en' ),
181
- 'google.com' => array( 'country' => 'Worldwide', 'language' => 'English', 'code' => 'en' ),
182
- 'google.vu' => array( 'country' => 'Vanuatu', 'language' => 'English', 'code' => 'en' ),
183
- 'google.co.zm' => array( 'country' => 'Zambia', 'language' => 'English', 'code' => 'en' ),
184
- 'google.co.zw' => array( 'country' => 'Zimbabwe', 'language' => 'English', 'code' => 'en' ),
185
- 'google.ac' => array( 'country' => 'Ascension Island', 'language' => 'English', 'code' => 'en' ),
186
- 'google.com.ai' => array( 'country' => 'Anguilla', 'language' => 'English', 'code' => 'en' ),
187
- 'google.as' => array( 'country' => 'American Samoa', 'language' => 'English', 'code' => 'en' ),
188
- 'google.com.au' => array( 'country' => 'Australia', 'language' => 'English', 'code' => 'en' ),
189
- 'google.bs' => array( 'country' => 'Bahamas', 'language' => 'English', 'code' => 'en' ),
190
- 'google.co.bw' => array( 'country' => 'Botswana', 'language' => 'English', 'code' => 'en' ),
191
- 'google.com.bz' => array( 'country' => 'Belize', 'language' => 'English', 'code' => 'en' ),
192
- 'google.cc' => array( 'country' => 'Cocos (Keeling) Islands', 'language' => 'English', 'code' => 'en' ),
193
- 'google.co.ck' => array( 'country' => 'Cook Islands', 'language' => 'English', 'code' => 'en' ),
194
- 'google.cm' => array( 'country' => 'Cameroon', 'language' => 'English', 'code' => 'en' ),
195
- 'google.dm' => array( 'country' => 'Dominica', 'language' => 'English', 'code' => 'en' ),
196
- 'google.com.fj' => array( 'country' => 'Fiji', 'language' => 'English', 'code' => 'en' ),
197
- 'google.com.gh' => array( 'country' => 'Ghana', 'language' => 'English', 'code' => 'en' ),
198
- 'google.com.gi' => array( 'country' => 'Gibraltar', 'language' => 'English', 'code' => 'en' ),
199
- 'google.gm' => array( 'country' => 'Gambia', 'language' => 'English', 'code' => 'en' ),
200
- 'google.gy' => array( 'country' => 'Guyana', 'language' => 'English', 'code' => 'en' ),
201
- 'google.ie' => array( 'country' => 'Ireland', 'language' => 'English', 'code' => 'en' ),
202
- 'google.io' => array(
203
- 'country' => 'British Indian Ocean Territory',
204
- 'language' => 'English',
205
- 'code' => 'en'
206
- ),
207
- 'google.com.jm' => array( 'country' => 'Jamaica', 'language' => 'English', 'code' => 'en' ),
208
- 'google.co.ke' => array( 'country' => 'Kenya', 'language' => 'English', 'code' => 'en' ),
209
- 'google.ki' => array( 'country' => 'Kiribati', 'language' => 'English', 'code' => 'en' ),
210
- 'google.co.ls' => array( 'country' => 'Lesotho', 'language' => 'English', 'code' => 'en' ),
211
- 'google.ms' => array( 'country' => 'Montserrat', 'language' => 'English', 'code' => 'en' ),
212
- 'google.com.mt' => array( 'country' => 'Malta', 'language' => 'English', 'code' => 'en' ),
213
- 'google.mu' => array( 'country' => 'Mauritius', 'language' => 'English', 'code' => 'en' ),
214
- 'google.mw' => array( 'country' => 'Malawi', 'language' => 'English', 'code' => 'en' ),
215
- 'google.com.my' => array( 'country' => 'Malaysia', 'language' => 'English', 'code' => 'en' ),
216
- 'google.com.na' => array( 'country' => 'Namibia', 'language' => 'English', 'code' => 'en' ),
217
- 'google.com.nf' => array( 'country' => 'Norfolk Island', 'language' => 'English', 'code' => 'en' ),
218
- 'google.nr' => array( 'country' => 'Nauru', 'language' => 'English', 'code' => 'en' ),
219
- 'google.co.nz' => array( 'country' => 'New Zealand', 'language' => 'English', 'code' => 'en' ),
220
- 'google.com.pg' => array( 'country' => 'Papua New Guinea', 'language' => 'English', 'code' => 'en' ),
221
- 'google.pn' => array( 'country' => 'Pitcairn Islands', 'language' => 'English', 'code' => 'en' ),
222
- 'google.rw' => array( 'country' => 'Rwanda', 'language' => 'English', 'code' => 'en' ),
223
- 'google.sh' => array(
224
- 'country' => 'Saint Helena, Ascension and Tristan da Cunha',
225
- 'language' => 'English',
226
- 'code' => 'en'
227
- ),
228
- 'google.com.sl' => array( 'country' => 'Sierra Leone', 'language' => 'English', 'code' => 'en' ),
229
- 'google.com.vc' => array(
230
- 'country' => 'Saint Vincent and the Grenadines',
231
- 'language' => 'English',
232
- 'code' => 'en'
233
- ),
234
- 'google.vg' => array( 'country' => 'British Virgin Islands', 'language' => 'English', 'code' => 'en' ),
235
- 'google.co.vi' => array(
236
- 'country' => 'United States Virgin Islands',
237
- 'language' => 'English',
238
- 'code' => 'en'
239
- ),
240
- 'google.ws' => array( 'country' => 'Samoa', 'language' => 'English', 'code' => 'en' ),
241
- 'google.co.za' => array( 'country' => 'South Africa', 'language' => 'English', 'code' => 'en' ),
242
- 'google.com.ph' => array( 'country' => 'Philippines', 'language' => 'Filipino', 'code' => 'fl' ),
243
- 'google.fi' => array( 'country' => 'Finland', 'language' => 'Finnish', 'code' => 'fi' ),
244
- 'google.bf' => array( 'country' => 'Burkina Faso', 'language' => 'French', 'code' => 'fr' ),
245
- 'google.cd' => array(
246
- 'country' => 'Democratic Republic of the Congo',
247
- 'language' => 'French',
248
- 'code' => 'fr'
249
- ),
250
- 'google.cg' => array( 'country' => 'Republic of the Congo', 'language' => 'French', 'code' => 'fr' ),
251
- 'google.ci' => array( 'country' => 'Ivory Coast', 'language' => 'French', 'code' => 'fr' ),
252
- 'google.ne' => array( 'country' => 'Niger', 'language' => 'French', 'code' => 'fr' ),
253
- 'google.tg' => array( 'country' => 'Togo', 'language' => 'French', 'code' => 'fr' ),
254
- 'google.bj' => array( 'country' => 'Benin', 'language' => 'French', 'code' => 'fr' ),
255
- 'google.ca' => array( 'country' => 'Canada', 'language' => 'French', 'code' => 'fr' ),
256
- 'google.cf' => array( 'country' => 'Central African Republic', 'language' => 'French', 'code' => 'fr' ),
257
- 'google.fr' => array( 'country' => 'France', 'language' => 'French', 'code' => 'fr' ),
258
- 'google.ga' => array( 'country' => 'Gabon', 'language' => 'French', 'code' => 'fr' ),
259
- 'google.gf' => array( 'country' => 'French Guiana', 'language' => 'French', 'code' => 'fr' ),
260
- 'google.gg' => array( 'country' => 'Guernsey', 'language' => 'French', 'code' => 'fr' ),
261
- 'google.gp' => array( 'country' => 'Guadeloupe', 'language' => 'French', 'code' => 'fr' ),
262
- 'google.ht' => array( 'country' => 'Haiti', 'language' => 'French', 'code' => 'fr' ),
263
- 'google.je' => array( 'country' => 'Jersey', 'language' => 'French', 'code' => 'fr' ),
264
- 'google.lu' => array( 'country' => 'Luxembourg', 'language' => 'French', 'code' => 'fr' ),
265
- 'google.mg' => array( 'country' => 'Madagascar', 'language' => 'French', 'code' => 'fr' ),
266
- 'google.ml' => array( 'country' => 'Mali', 'language' => 'French', 'code' => 'fr' ),
267
- 'google.sn' => array( 'country' => 'Senegal', 'language' => 'French', 'code' => 'fr' ),
268
- 'google.ge' => array( 'country' => 'Georgia', 'language' => 'Georgian', 'code' => 'ka' ),
269
- 'google.ch' => array( 'country' => 'Switzerland', 'language' => 'German', 'code' => 'de' ),
270
- 'google.de' => array( 'country' => 'Germany', 'language' => 'German', 'code' => 'de' ),
271
- 'google.at' => array( 'country' => 'Austria', 'language' => 'German', 'code' => 'de' ),
272
- 'google.li' => array( 'country' => 'Liechtenstein', 'language' => 'German', 'code' => 'de' ),
273
- 'google.com.cy' => array( 'country' => 'Cyprus', 'language' => 'Greek', 'code' => 'el' ),
274
- 'google.gr' => array( 'country' => 'Greece', 'language' => 'Greek', 'code' => 'el' ),
275
- 'google.gl' => array( 'country' => 'Greenland', 'language' => 'Greenlandic', 'code' => 'kal' ),
276
- 'google.co.il' => array( 'country' => 'Israel', 'language' => 'Hebrew', 'code' => 'he' ),
277
- 'google.co.in' => array( 'country' => 'India', 'language' => 'Hindi', 'code' => 'hi' ),
278
- 'google.hu' => array( 'country' => 'Hungary', 'language' => 'Hungarian', 'code' => 'hu' ),
279
- 'google.is' => array( 'country' => 'Iceland', 'language' => 'Icelandic', 'code' => 'is' ),
280
- 'google.co.id' => array( 'country' => 'Indonesia', 'language' => 'Indonesian', 'code' => 'id' ),
281
- 'google.it' => array( 'country' => 'Italy', 'language' => 'Italian', 'code' => 'it' ),
282
- 'google.sm' => array( 'country' => 'San Marino', 'language' => 'Italian', 'code' => 'it' ),
283
- 'google.co.jp' => array( 'country' => 'Japan', 'language' => 'Japanese', 'code' => 'ja' ),
284
- 'google.com.kh' => array( 'country' => 'Cambodia', 'language' => 'Khmer', 'code' => 'km' ),
285
- 'google.bi' => array( 'country' => 'Burundi', 'language' => 'Kirundi', 'code' => 'rn' ),
286
- 'google.co.kr' => array( 'country' => 'South Korea', 'language' => 'Korean', 'code' => 'ko' ),
287
- 'google.la' => array( 'country' => 'Laos', 'language' => 'Lao', 'code' => 'lo' ),
288
- 'google.lv' => array( 'country' => 'Latvia', 'language' => 'Latvian', 'code' => 'lv' ),
289
- 'google.lt' => array( 'country' => 'Lithuania', 'language' => 'Lithuanian', 'code' => 'lt' ),
290
- 'google.com.np' => array( 'country' => 'Nepal', 'language' => 'Maithili', 'code' => 'ne' ),
291
- 'google.com.bn' => array( 'country' => 'Brunei', 'language' => 'Malay', 'code' => 'ms' ),
292
- 'google.cn' => array( 'country' => 'China', 'language' => 'Mandarin', 'code' => 'zh' ),
293
- 'google.com.tw' => array( 'country' => 'Taiwan', 'language' => 'Mandarin', 'code' => 'zh' ),
294
- 'google.co.tz' => array( 'country' => 'Tanzania', 'language' => 'Mandarin', 'code' => 'tz' ),
295
- 'google.im' => array( 'country' => 'Isle of Man', 'language' => 'Manx', 'code' => 'gv' ),
296
- 'google.mn' => array( 'country' => 'Mongolia', 'language' => 'Mongolian', 'code' => 'mn' ),
297
- 'google.nu' => array( 'country' => 'Niue', 'language' => 'Niuean', 'code' => 'ne' ),
298
- 'google.no' => array( 'country' => 'Norway', 'language' => 'Norwegian', 'code' => 'no' ),
299
- 'google.com.af' => array( 'country' => 'Afghanistan', 'language' => 'Pashto', 'code' => 'ps' ),
300
- 'google.pl' => array( 'country' => 'Poland', 'language' => 'Polish', 'code' => 'pl' ),
301
- 'google.co.ao' => array( 'country' => 'Angola', 'language' => 'Portuguese', 'code' => 'pt' ),
302
- 'google.com.br' => array( 'country' => 'Brazil', 'language' => 'Portuguese', 'code' => 'pt' ),
303
- 'google.cv' => array( 'country' => 'Cape Verde', 'language' => 'Portuguese', 'code' => 'pt' ),
304
- 'google.co.mz' => array( 'country' => 'Mozambique', 'language' => 'Portuguese', 'code' => 'pt' ),
305
- 'google.pt' => array( 'country' => 'Portugal', 'language' => 'Portuguese', 'code' => 'pt' ),
306
- 'google.st' => array(
307
- 'country' => 'São Tomé and Príncipe',
308
- 'language' => 'Portuguese',
309
- 'code' => 'pt'
310
- ),
311
- 'google.tl' => array( 'country' => 'Timor-Leste', 'language' => 'Portuguese', 'code' => 'pt' ),
312
- 'google.md' => array( 'country' => 'Moldova', 'language' => 'Romanian', 'code' => 'ro' ),
313
- 'google.ro' => array( 'country' => 'Romania', 'language' => 'Romanian', 'code' => 'ro' ),
314
- 'google.kg' => array( 'country' => 'Kyrgyzstan', 'language' => 'Russian', 'code' => 'ru' ),
315
- 'google.kz' => array( 'country' => 'Kazakhstan', 'language' => 'Russian', 'code' => 'ru' ),
316
- 'google.ru' => array( 'country' => 'Russia', 'language' => 'Russian', 'code' => 'ru' ),
317
- 'google.rs' => array( 'country' => 'Serbia', 'language' => 'Serbian', 'code' => 'sr' ),
318
- 'google.lk' => array( 'country' => 'Sri Lanka', 'language' => 'Sinhala', 'code' => 'si' ),
319
- 'google.sk' => array( 'country' => 'Slovakia', 'language' => 'Slovak', 'code' => 'sk' ),
320
- 'google.si' => array( 'country' => 'Slovenia', 'language' => 'Slovene', 'code' => 'sl' ),
321
- 'google.es' => array( 'country' => 'Spain', 'language' => 'Spanish', 'code' => 'es' ),
322
- 'google.com.ni' => array( 'country' => 'Nicaragua', 'language' => 'Spanish', 'code' => 'es' ),
323
- 'google.com.pa' => array( 'country' => 'Panama', 'language' => 'Spanish', 'code' => 'es' ),
324
- 'google.com.pe' => array( 'country' => 'Peru', 'language' => 'Spanish', 'code' => 'es' ),
325
- 'google.com.uy' => array( 'country' => 'Uruguay', 'language' => 'Spanish', 'code' => 'es' ),
326
- 'google.co.ve' => array( 'country' => 'Venezuela', 'language' => 'Spanish', 'code' => 'es' ),
327
- 'google.com.ar' => array( 'country' => 'Argentina', 'language' => 'Spanish', 'code' => 'es' ),
328
- 'google.com.bo' => array( 'country' => 'Bolivia', 'language' => 'Spanish', 'code' => 'es' ),
329
- 'google.cl' => array( 'country' => 'Chile', 'language' => 'Spanish', 'code' => 'es' ),
330
- 'google.com.co' => array( 'country' => 'Colombia', 'language' => 'Spanish', 'code' => 'es' ),
331
- 'google.co.cr' => array( 'country' => 'Costa Rica', 'language' => 'Spanish', 'code' => 'es' ),
332
- 'google.com.cu' => array( 'country' => 'Cuba', 'language' => 'Spanish', 'code' => 'es' ),
333
- 'google.com.do' => array( 'country' => 'Dominican Republic', 'language' => 'Spanish', 'code' => 'es' ),
334
- 'google.com.ec' => array( 'country' => 'Ecuador', 'language' => 'Spanish', 'code' => 'es' ),
335
- 'google.ee' => array( 'country' => 'Estonia', 'language' => 'Spanish', 'code' => 'es' ),
336
- 'google.com.gt' => array( 'country' => 'Guatemala', 'language' => 'Spanish', 'code' => 'es' ),
337
- 'google.hn' => array( 'country' => 'Honduras', 'language' => 'Spanish', 'code' => 'es' ),
338
- 'google.com.mx' => array( 'country' => 'Mexico', 'language' => 'Spanish', 'code' => 'es' ),
339
- 'google.com.pr' => array( 'country' => 'Puerto Rico', 'language' => 'Spanish', 'code' => 'es' ),
340
- 'google.com.py' => array( 'country' => 'Paraguay', 'language' => 'Spanish', 'code' => 'es' ),
341
- 'google.com.sv' => array( 'country' => 'El Salvador', 'language' => 'Spanish', 'code' => 'es' ),
342
- 'google.se' => array( 'country' => 'Sweden', 'language' => 'Swedish', 'code' => 'sv' ),
343
- 'google.com.tj' => array( 'country' => 'Tajikistan', 'language' => 'Tajiki', 'code' => 'tj' ),
344
- 'google.co.th' => array( 'country' => 'Thailand', 'language' => 'Thai', 'code' => 'th' ),
345
- 'google.tk' => array( 'country' => 'Tokelau', 'language' => 'Tokelauan', 'code' => 'tkl' ),
346
- 'google.com.tr' => array( 'country' => 'Turkey', 'language' => 'Turkish', 'code' => 'tr' ),
347
- 'google.tm' => array( 'country' => 'Turkmenistan', 'language' => 'Turkmen', 'code' => 'tk' ),
348
- 'google.com.ua' => array( 'country' => 'Ukraine', 'language' => 'Ukrainian', 'code' => 'uk' ),
349
- 'google.com.pk' => array( 'country' => 'Pakistan', 'language' => 'Urdu', 'code' => 'ur' ),
350
- 'google.co.uz' => array( 'country' => 'Uzbekistan', 'language' => 'Uzbek', 'code' => 'uz' ),
351
- 'google.com.vn' => array( 'country' => 'Vietnam', 'language' => 'Vietnamese', 'code' => 'vi' ),
352
- );
353
-
354
- if ( isset( $domains[ $domain_name ] ) ) {
355
- return $domains[ $domain_name ];
356
- }
357
- }
358
-
359
- public function get_countries() {
360
- global $wpdb, $WP_Statistics;
361
-
362
- $result = $wpdb->get_results( "SELECT referred, SUM(hits) as hits, COUNT(*) as visitors FROM {$wpdb->prefix}statistics_visitor WHERE referred != '' AND referred LIKE '%google.%' and referred NOT LIKE '%google.com%' AND referred REGEXP \"^(https?://|www\\.)[\.A-Za-z0-9\-]+\\.[a-zA-Z]{2,4}\" AND `last_counter` BETWEEN '{$WP_Statistics->Current_Date( 'Y-m-d', -365 )}' AND '{$WP_Statistics->Current_Date( 'Y-m-d' )}' GROUP BY referred HAVING visitors > '1' ORDER BY `visitors` DESC" );
363
-
364
- return $result;
365
- }
366
-
367
- private function get_default_languages( $excludes = array() ) {
368
- $data = array(
369
- array(
370
- 'language' => 'Spanish',
371
- 'code' => 'es',
372
- 'potential_traffic' => '1706',
373
- 'potential_traffic_percent' => '239%',
374
- 'potential_leads' => '67',
375
- 'potential_leads_percent' => '346%',
376
- ),
377
- array(
378
- 'language' => 'German',
379
- 'code' => 'de',
380
- 'potential_traffic' => '1600',
381
- 'potential_traffic_percent' => '218%',
382
- 'potential_leads' => '52',
383
- 'potential_leads_percent' => '246%',
384
- ),
385
- array(
386
- 'language' => 'Italian',
387
- 'code' => 'it',
388
- 'potential_traffic' => '1383',
389
- 'potential_traffic_percent' => '179%',
390
- 'potential_leads' => '37',
391
- 'potential_leads_percent' => '146%',
392
- ),
393
- array(
394
- 'language' => 'French',
395
- 'code' => 'fr',
396
- 'potential_traffic' => '906',
397
- 'potential_traffic_percent' => '100%',
398
- 'potential_leads' => '20',
399
- 'potential_leads_percent' => '53%',
400
- )
401
- );
402
-
403
- if ( ! $excludes ) {
404
- return $data;
405
- }
406
-
407
- foreach ( $data as $key => $value ) {
408
- if ( array_search( $value['language'], $excludes ) !== false ) {
409
- unset( $data[ $key ] );
410
- }
411
- }
412
-
413
- return $data;
414
- }
415
-
416
- public function get_suggestion() {
417
- $countries = $this->get_countries();
418
- $languages = array();
419
- $_languages = array();
420
- $data = array();
421
-
422
- // Remove first item
423
- if ( is_array( $countries ) ) {
424
- unset( $countries[0] );
425
- }
426
-
427
- foreach ( $countries as $value ) {
428
- $domain_info = $this->get_domain_info( $this->get_base_url( $value->referred ) );
429
-
430
- if ( isset( $languages[ $domain_info['language'] ] ) ) {
431
-
432
- $hits = $languages[ $domain_info['language'] ]['hits'];
433
- $visitors = $languages[ $domain_info['language'] ]['visitors'];
434
-
435
- $languages[ $domain_info['language'] ]['hits'] = $value->hits + $hits;
436
- $languages[ $domain_info['language'] ]['visitors'] = $value->visitors + $visitors;
437
-
438
- } else {
439
- $languages[ $domain_info['language'] ] = array(
440
- 'hits' => $value->hits,
441
- 'visitors' => $value->visitors,
442
- 'language' => $domain_info['language'],
443
- 'code' => $domain_info['code'],
444
- );
445
- }
446
- }
447
-
448
- // Return default language
449
- if ( ! $languages ) {
450
- return $this->get_default_languages();
451
- }
452
-
453
- // Remove current language
454
- $current_language_code = $this->get_current_lang_code();
455
- foreach ( $languages as $key => $value ) {
456
- if ( $current_language_code and $value['code'] == $current_language_code ) {
457
- unset( $languages[ $key ] );
458
- }
459
- }
460
-
461
- // Slice array
462
- $languages = array_slice( $languages, 0, 4 );
463
-
464
- $i = 0;
465
- $data_rate = array( 2.4, 2.2, 1.8, 0.8 );
466
- $traffic_rate = array( 3.4, 3.2, 2.8, 2.0 );
467
- $leads_rate = array( 4.5, 3.5, 2.5, 1.5 );
468
-
469
- foreach ( $languages as $key => $value ) {
470
- $visitor = (int) ( $value['visitors'] * $data_rate[ $i ] );
471
- $leads = $this->percentage( $visitor, 3 ) * $leads_rate[ $i ];
472
- $_languages[] = $key;
473
-
474
- $data[] = array(
475
- 'language' => $key,
476
- 'visitors' => $visitor,
477
- 'potential_traffic' => $visitor * $traffic_rate[ $i ],
478
- 'potential_traffic_percent' => $this->percentage_increase( $visitor, $visitor * $traffic_rate[ $i ] ) . '%',
479
- 'potential_leads' => $leads,
480
- 'potential_leads_percent' => $this->percentage_increase( $this->percentage( $visitor, 3 ), $leads ) . '%',
481
- 'hits' => $value['hits'],
482
- );
483
-
484
- $i ++;
485
- }
486
-
487
- // Add default languages to current languages
488
- if ( count( $data ) < 2 ) {
489
- $default_languages = array_slice( $this->get_default_languages( $_languages ), 0, 3 );
490
-
491
- // Remove current language
492
- foreach ( $default_languages as $key => $value ) {
493
- if ( $current_language_code and $value['code'] == $current_language_code ) {
494
- unset( $default_languages[ $key ] );
495
- }
496
- }
497
-
498
- $data = array_merge( $data, $default_languages );
499
- }
500
-
501
- return $data;
502
- }
503
-
504
- private function get_current_lang_code() {
505
- $lang = explode( '-', get_bloginfo( "language" ) );
506
-
507
- if ( isset( $lang[0] ) ) {
508
- return $lang[0];
509
- }
510
- }
511
-
512
- private function percentage_increase( $x1, $x2 ) {
513
- $diff = ( $x2 - $x1 ) / $x1;
514
-
515
- return (int) round( $diff * 100, 2 );
516
- }
517
-
518
- private function percentage( $x1, $x2 ) {
519
- $diff = ( $x1 * $x2 ) / 100;
520
-
521
- if ( $diff < 1 ) {
522
- $diff = 1;
523
- }
524
-
525
- return (int) round( $diff, 2 );
526
- }
527
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/templates/suggestions/travod.php DELETED
@@ -1,64 +0,0 @@
1
- <div class="wp-statistics-travod">
2
- <div class="header">
3
- <div class="left">
4
- <p><a href="<?php bloginfo( 'url' ); ?>"><?php echo $base_url; ?></a>, Go global with TRAVOD</p>
5
- </div>
6
-
7
- <div class="right">
8
- <p>Professional Translation Service by TRAVOD <a href="https://translate.travod.com/website" target="_blank"><img src="http://bit.ly/2Kbnm50?v=<?php echo time(); ?>"></a></p>
9
- <button type="button" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span>
10
- </button>
11
- </div>
12
- </div>
13
-
14
- <div class="column">
15
- <div class="columns column-1">
16
- <section>
17
- <h2>Translate your website into 4 languages and get:</h2>
18
- <ul>
19
- <li><span class="dashicons dashicons-yes"></span> International Sales Growth</li>
20
- <li><span class="dashicons dashicons-yes"></span> Increased Web Traffic</li>
21
- <li><span class="dashicons dashicons-yes"></span> Improved SEO</li>
22
- <li><span class="dashicons dashicons-yes"></span> Greater Brand Awareness</li>
23
- <li><span class="dashicons dashicons-yes"></span> Global Online Reach</li>
24
- </ul>
25
- </section>
26
- </div>
27
-
28
- <div class="columns column-2">
29
- <section>
30
- <table width="100%" cellpadding="0" cellspacing="0">
31
- <thead>
32
- <tr>
33
- <td><span class="dashicons dashicons-arrow-down"></span> Language</td>
34
- <td><span class="dashicons dashicons-arrow-down"></span> Potential Traffic</td>
35
- <td><span class="dashicons dashicons-arrow-down"></span> Potential Leads</td>
36
- </tr>
37
- </thead>
38
-
39
- <tbody>
40
- <?php foreach ( $this->get_suggestion() as $item ) : ?>
41
- <tr>
42
- <td><?php echo $item['language']; ?></td>
43
- <td><span class="dashicons dashicons-arrow-up"></span> <?php echo $item['potential_traffic_percent']; ?> (<?php echo $item['potential_traffic']; ?> Visitors)</td>
44
- <td><span class="dashicons dashicons-arrow-up"></span> <?php echo $item['potential_leads_percent']; ?> (<?php echo $item['potential_leads']; ?> Leads)</td>
45
- </tr>
46
- <?php endforeach; ?>
47
- </tbody>
48
- </table>
49
- </section>
50
- </div>
51
-
52
- <div class="columns column-3">
53
- <section>
54
- <h1>TRANSLATE YOUR WEBSITE</h1>
55
- <p>Go global. Generate 4x more sales from untapped markets. Simply complete the form and our Translation Advisory Team will be in touch with you soon.</p>
56
- <form class="travod-quote-form" method="post" action="">
57
- <input type="text" name="full_name" class="regular-text" value="<?php echo $current_user_fullname; ?>" required="required" placeholder="Your Full name"/>
58
- <input type="email" name="email" class="regular-text" value="<?php echo get_option( 'admin_email' ); ?>" required="required" placeholder="Your Email Address"/>
59
- <input type="submit" class="button button-primary" value="CHECK PRICING"/>
60
- </form>
61
- </section>
62
- </div>
63
- </div>
64
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/vendor/composer/installed.json CHANGED
@@ -620,7 +620,8 @@
620
  "parser",
621
  "user agent",
622
  "user-agent"
623
- ]
 
624
  },
625
  {
626
  "name": "mimmi20/wurflcache",
@@ -686,7 +687,8 @@
686
  "keywords": [
687
  "Wurfl",
688
  "cache"
689
- ]
 
690
  },
691
  {
692
  "name": "monolog/monolog",
620
  "parser",
621
  "user agent",
622
  "user-agent"
623
+ ],
624
+ "abandoned": true
625
  },
626
  {
627
  "name": "mimmi20/wurflcache",
687
  "keywords": [
688
  "Wurfl",
689
  "cache"
690
+ ],
691
+ "abandoned": true
692
  },
693
  {
694
  "name": "monolog/monolog",
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://wp-statistics.com/donate/
4
  Tags: analytics, wordpress analytics, stats, statistics, visit, visitors, hits, chart, browser, today, yesterday, week, month, year, total, post, page, sidebar, google, live visit, search word, agent, google analytics, webmasters, google webmasters, geoip, location
5
  Requires at least: 3.0
6
  Tested up to: 4.9
7
- Stable tag: 12.4.2
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -112,8 +112,8 @@ We implement GDPR into the WP-Statistics. for more information read [the blog po
112
  Important: with this update, Opt-out feature is removed.
113
 
114
  == Changelog ==
115
- = 12.4.2 =
116
- * Disabled the welcome page.
117
 
118
  = 12.4.1 =
119
  * Implemented the `do_welcome()` function.
4
  Tags: analytics, wordpress analytics, stats, statistics, visit, visitors, hits, chart, browser, today, yesterday, week, month, year, total, post, page, sidebar, google, live visit, search word, agent, google analytics, webmasters, google webmasters, geoip, location
5
  Requires at least: 3.0
6
  Tested up to: 4.9
7
+ Stable tag: 12.4.3
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
112
  Important: with this update, Opt-out feature is removed.
113
 
114
  == Changelog ==
115
+ = 12.4.3 =
116
+ * Disabled the welcome page and Travod widget.
117
 
118
  = 12.4.1 =
119
  * Implemented the `do_welcome()` function.
wp-statistics.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: WP Statistics
4
  * Plugin URI: https://wp-statistics.com/
5
  * Description: Complete WordPress Analytics and Statistics for your site!
6
- * Version: 12.4.2
7
  * Author: Verona Labs
8
  * Author URI: http://veronalabs.com/
9
  *
3
  * Plugin Name: WP Statistics
4
  * Plugin URI: https://wp-statistics.com/
5
  * Description: Complete WordPress Analytics and Statistics for your site!
6
+ * Version: 12.4.3
7
  * Author: Verona Labs
8
  * Author URI: http://veronalabs.com/
9
  *