| @@ -2,14 +2,16 @@ | ||
| 2 | 2 | /** |
| 3 | 3 | * Weather support |
| 4 | 4 | * |
| 5 | 5 | * @package event-post |
| 6 | - * @version 5.11.0 | |
| 6 | + * @version 6.1.2 | |
| 7 | 7 | * @since 4.3.0 |
| 8 | 8 | */ |
| 9 | 9 | |
| 10 | 10 | namespace EventPost; |
| 11 | 11 | |
| 12 | +if ( ! defined( 'ABSPATH' ) ) exit; | |
| 13 | + | |
| 12 | 14 | $EventPostWeather = new Weather(); |
| 13 | 15 | |
| 14 | 16 | /** |
| 15 | 17 | * Provides weather support thanks to OpenWeatherMap |
| @@ -260,9 +262,9 @@ | ||
| 260 | 262 | |
| 261 | 263 | function get_weather_icons($weather){ |
| 262 | 264 | $string = ''; |
| 263 | 265 | foreach((array) $weather as $item){ |
| 264 | - $text = ucfirst(__(strtolower($item->description), 'event-post')); | |
| 266 | + $text = ucfirst(__(strtolower($item->description), 'event-post')); // phpcs:ignore WordPress.WP.I18n | |
| 265 | 267 | $string.='<span class="eventpost-weather-'.str_replace('-', '', strtolower($item->description)).' eventpost-weather-'.$item->icon.'">' |
| 266 | 268 | // Translators: %s is the weather description |
| 267 | 269 | . '<img src="'. plugins_url('../img/weather/'.$this->theme.'/'.$item->icon.'.png', __FILE__).'" alt="'.sprintf('%s icon', $text).'">' |
| 268 | 270 | . '<em class="eventpost-weather-text">'.$text.'</em>' |