WP Statistics - Version 12.0.8.1

Version Description

  • Release Date: July 2, 2017
  • Fixed: load languages file. please visit translations page to help translation.
Download this release

Release Info

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

Code changes from version 12.0.8 to 12.0.8.1

languages/index.php CHANGED
@@ -1,2 +1,2 @@
1
- <?php
2
- // Silence is golden.
1
+ <?php
2
+ // Silence is golden.
languages/readme.txt CHANGED
@@ -1,5 +1,5 @@
1
- Translations have moved to
2
- https://translate.wordpress.org/projects/wp-plugins/wp-statistics
3
- Please visit https://wp-statistics.com/translations/ to help translation.
4
-
5
  Thank you for your contribution.
1
+ Translations have moved to
2
+ https://translate.wordpress.org/projects/wp-plugins/wp-statistics
3
+ Please visit https://wp-statistics.com/translations/ to help translation.
4
+
5
  Thank you for your contribution.
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://wp-statistics.com/donate/
4
  Tags: statistics, stats, visit, visitors, chart, browser, blog, today, yesterday, week, month, year, total, post, page, sidebar, summary, hits, pagerank, google, alexa, live visit
5
  Requires at least: 3.0
6
  Tested up to: 4.8
7
- Stable tag: 12.0.8
8
  License: GPL3
9
 
10
  Complete statistics for your WordPress site.
@@ -287,6 +287,10 @@ You may also downgrade to WP Statistics 10.3 as a temporary measure, but no new
287
  This is a security fix, please update immediately.
288
 
289
  == Changelog ==
 
 
 
 
290
  = 12.0.8 =
291
  * Release Date: June 29, 2017
292
  * Fixed: SQL Injection vulnerability, thanks John Castro for reporting issue from sucuri.net Team.
4
  Tags: statistics, stats, visit, visitors, chart, browser, blog, today, yesterday, week, month, year, total, post, page, sidebar, summary, hits, pagerank, google, alexa, live visit
5
  Requires at least: 3.0
6
  Tested up to: 4.8
7
+ Stable tag: 12.0.8.1
8
  License: GPL3
9
 
10
  Complete statistics for your WordPress site.
287
  This is a security fix, please update immediately.
288
 
289
  == Changelog ==
290
+ = 12.0.8.1 =
291
+ * Release Date: July 2, 2017
292
+ * Fixed: load languages file. please visit [translations page](https://wp-statistics.com/translations/) to help translation.
293
+
294
  = 12.0.8 =
295
  * Release Date: June 29, 2017
296
  * Fixed: SQL Injection vulnerability, thanks John Castro for reporting issue from sucuri.net Team.
wp-statistics.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: WP Statistics
4
  * Plugin URI: http://wp-statistics.com/
5
  * Description: Complete statistics for your WordPress site.
6
- * Version: 12.0.8
7
  * Author: WP-Statistics Team
8
  * Author URI: http://wp-statistics.com/
9
  * Text Domain: wp_statistics
@@ -12,7 +12,7 @@
12
  */
13
 
14
  // These defines are used later for various reasons.
15
- define( 'WP_STATISTICS_VERSION', '12.0.8' );
16
  define( 'WP_STATISTICS_REQUIRED_PHP_VERSION', '5.4.0' );
17
  define( 'WP_STATISTICS_REQUIRED_GEOIP_PHP_VERSION', WP_STATISTICS_REQUIRED_PHP_VERSION );
18
  define( 'WPS_EXPORT_FILE_NAME', 'wp-statistics' );
@@ -57,7 +57,11 @@ function wp_statistics_language() {
57
 
58
  // If not, go ahead and load the translations.
59
  if ( ! $override ) {
60
- load_plugin_textdomain( 'wp_statistics', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
 
 
 
 
61
  __( 'WP Statistics', 'wp_statistics' );
62
  __( 'Complete statistics for your WordPress site.', 'wp_statistics' );
63
  }
@@ -513,7 +517,7 @@ function wp_statistics_menu() {
513
 
514
  $WP_Statistics->menu_slugs['optimize'] = add_submenu_page( WP_STATISTICS_OVERVIEW_PAGE, __( 'Optimization', 'wp_statistics' ), __( 'Optimization', 'wp_statistics' ), $manage_cap, WP_STATISTICS_OPTIMIZATION_PAGE, 'wp_statistics_optimization' );
515
  $WP_Statistics->menu_slugs['settings'] = add_submenu_page( WP_STATISTICS_OVERVIEW_PAGE, __( 'Settings', 'wp_statistics' ), __( 'Settings', 'wp_statistics' ), $read_cap, WP_STATISTICS_SETTINGS_PAGE, 'wp_statistics_settings' );
516
- $WP_Statistics->menu_slugs['donate'] = add_submenu_page( WP_STATISTICS_OVERVIEW_PAGE, __( 'Donate', 'wp_statistics' ), __( 'Donate', 'wp_statistics' ), $read_cap, WP_STATISTICS_DONATE_PAGE, 'wp_statistics_donate' );
517
 
518
  // Add action to load the meta boxes to the overview page.
519
  add_action( 'load-' . $WP_Statistics->menu_slugs['overview'], 'wp_statistics_load_overview_page' );
@@ -679,9 +683,7 @@ function wp_statistics_goto_network_blog() {
679
  }
680
 
681
  function wp_statistics_donate() {
682
- $url = get_admin_url() . "/admin.php?page=" . WP_STATISTICS_SETTINGS_PAGE . "&tab=about";
683
-
684
- echo "<script>window.open('http://wp-statistics.com/donate','_blank'); window.location.href = '$url';</script>";
685
  }
686
 
687
  // This function adds the menu icon to the top level menu. WordPress 3.8 changed the style of the menu a bit and so a different css file is loaded.
3
  * Plugin Name: WP Statistics
4
  * Plugin URI: http://wp-statistics.com/
5
  * Description: Complete statistics for your WordPress site.
6
+ * Version: 12.0.8.1
7
  * Author: WP-Statistics Team
8
  * Author URI: http://wp-statistics.com/
9
  * Text Domain: wp_statistics
12
  */
13
 
14
  // These defines are used later for various reasons.
15
+ define( 'WP_STATISTICS_VERSION', '12.0.8.1' );
16
  define( 'WP_STATISTICS_REQUIRED_PHP_VERSION', '5.4.0' );
17
  define( 'WP_STATISTICS_REQUIRED_GEOIP_PHP_VERSION', WP_STATISTICS_REQUIRED_PHP_VERSION );
18
  define( 'WPS_EXPORT_FILE_NAME', 'wp-statistics' );
57
 
58
  // If not, go ahead and load the translations.
59
  if ( ! $override ) {
60
+ $domain = 'wp_statistics';
61
+ $locale = apply_filters( 'plugin_locale', get_locale(), $domain );
62
+
63
+ load_textdomain( $domain, trailingslashit( WP_LANG_DIR ) . 'plugins/wp-statistics-' . $locale . '.mo' );
64
+
65
  __( 'WP Statistics', 'wp_statistics' );
66
  __( 'Complete statistics for your WordPress site.', 'wp_statistics' );
67
  }
517
 
518
  $WP_Statistics->menu_slugs['optimize'] = add_submenu_page( WP_STATISTICS_OVERVIEW_PAGE, __( 'Optimization', 'wp_statistics' ), __( 'Optimization', 'wp_statistics' ), $manage_cap, WP_STATISTICS_OPTIMIZATION_PAGE, 'wp_statistics_optimization' );
519
  $WP_Statistics->menu_slugs['settings'] = add_submenu_page( WP_STATISTICS_OVERVIEW_PAGE, __( 'Settings', 'wp_statistics' ), __( 'Settings', 'wp_statistics' ), $read_cap, WP_STATISTICS_SETTINGS_PAGE, 'wp_statistics_settings' );
520
+ $WP_Statistics->menu_slugs['donate'] = add_submenu_page( WP_STATISTICS_OVERVIEW_PAGE, __( 'Donate', 'wp_statistics' ), '<span style="color:#459605">' . __( 'Donate', 'wp_statistics' ) . '</span>', $read_cap, WP_STATISTICS_DONATE_PAGE, 'wp_statistics_donate' );
521
 
522
  // Add action to load the meta boxes to the overview page.
523
  add_action( 'load-' . $WP_Statistics->menu_slugs['overview'], 'wp_statistics_load_overview_page' );
683
  }
684
 
685
  function wp_statistics_donate() {
686
+ echo "<script>window.location.href='http://wp-statistics.com/donate';</script>";
 
 
687
  }
688
 
689
  // This function adds the menu icon to the top level menu. WordPress 3.8 changed the style of the menu a bit and so a different css file is loaded.