PluginProbe
Event Post / 6.1.2
Event Post v6.1.2
6.1.2 6.1.1 6.1.0 6.0.1 6.0.0 5.12.0 trunk 3.9 4.0 4.2 4.3 4.4 4.5 5.0 5.1 5.10.0 5.10.1 5.10.2 5.10.3 5.10.4 5.11.0 5.11.1 5.2 5.5 5.6 All 47 releases
← All changes | inc/openweathermap.php +4 -2 5.12.0 → 6.1.2 View file →
@@ -2,14 +2,16 @@
2 2 /**
3 3 * Weather support
4 4 *
5 5 * @package event-post
6 - * @version 5.12.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>'