Awesome Weather Widget - Version 3.0.1

Version Description

  • Fix: Locale issues simplified.
Download this release

Release Info

Developer halgatewood
Plugin Icon 128x128 Awesome Weather Widget
Version 3.0.1
Comparing to
See all releases

Code changes from version 3.0 to 3.0.1

Files changed (2) hide show
  1. awesome-weather.php +12 -31
  2. readme.txt +3 -0
awesome-weather.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: https://halgatewood.com/awesome-weather
5
  Description: A weather widget that actually looks cool
6
  Author: Hal Gatewood
7
  Author URI: https://www.halgatewood.com
8
- Version: 3.0
9
  Text Domain: awesome-weather
10
  Domain Path: /languages
11
 
@@ -45,36 +45,17 @@ include_once( dirname(__FILE__) . '/awesome-weather-mediabox.php');
45
  // SETUP
46
  function awesome_weather_setup()
47
  {
48
- global $wp_version;
49
-
50
- $locale = get_locale();
51
- if( $wp_version >= 4.7 ) $locale = get_user_locale();
52
-
53
- if( !$locale ) $locale = get_bloginfo('language');
54
- if( !$locale ) $locale = WPLANG;
55
- if( !$locale ) $locale = 'en_US';
56
-
57
- $locale = apply_filters('plugin_locale', $locale, 'awesome-weather');
58
- $locale = apply_filters('awesome_weather_plugin_locale', $locale);
59
-
60
- $mofile = WP_LANG_DIR . '/awesome-weather/awesome-weather-' . $locale . '.mo';
61
- $mo_file_plugin = plugin_dir_path( __FILE__ ) . 'languages/awesome-weather-' . $locale . '.mo';
62
-
63
- if( file_exists( $mofile ) )
64
- {
65
- load_textdomain( 'awesome-weather', $mofile );
66
- load_plugin_textdomain( 'awesome-weather', false, $mofile );
67
- }
68
- else if ( file_exists( $mo_file_plugin ) )
69
- {
70
- load_textdomain( 'awesome-weather', $mo_file_plugin );
71
- load_plugin_textdomain( 'awesome-weather', false, $mo_file_plugin );
72
- }
73
- else
74
- {
75
- load_textdomain( 'awesome-weather', dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
76
- load_plugin_textdomain( 'awesome-weather', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
77
- }
78
 
79
  if( is_admin() )
80
  {
5
  Description: A weather widget that actually looks cool
6
  Author: Hal Gatewood
7
  Author URI: https://www.halgatewood.com
8
+ Version: 3.0.1
9
  Text Domain: awesome-weather
10
  Domain Path: /languages
11
 
45
  // SETUP
46
  function awesome_weather_setup()
47
  {
48
+ $locale = apply_filters('plugin_locale', get_locale(), 'awesome-weather');
49
+ $mofile = WP_LANG_DIR . '/awesome-weather/awesome-weather-' . $locale . '.mo';
50
+
51
+ if( file_exists( $mofile ) )
52
+ {
53
+ load_textdomain( 'awesome-weather', $mofile );
54
+ }
55
+ else
56
+ {
57
+ load_plugin_textdomain( 'awesome-weather', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
58
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
59
 
60
  if( is_admin() )
61
  {
readme.txt CHANGED
@@ -73,6 +73,9 @@ I have merged my PRO plugin into this FREE plugin. Enjoy all the new features!
73
 
74
  == Changelog ==
75
 
 
 
 
76
  = 3.0 =
77
  - New: Pro replaces free plugin. Thanks to everyone who supported me.
78
 
73
 
74
  == Changelog ==
75
 
76
+ = 3.0.1 =
77
+ - Fix: Locale issues simplified.
78
+
79
  = 3.0 =
80
  - New: Pro replaces free plugin. Thanks to everyone who supported me.
81