__('Air quality is considered satisfactory, and air pollution poses little or no risk.', 'air-quality-plugin'), 'alert_level_2' => __('Air quality is acceptable; however, for some pollutants there may be a moderate health concern for a very small number of people who are unusually sensitive to air pollution.', 'air-quality-plugin'), 'alert_level_3' => __('Members of sensitive groups may experience health effects. The general public is not likely to be affected.', 'air-quality-plugin'), 'alert_level_4' => __('Everyone may begin to experience health effects; members of sensitive groups may experience more serious health effects.', 'air-quality-plugin'), 'alert_level_5' => __('Health alert: everyone may experience more serious health effects.', 'air-quality-plugin'), 'alert_level_6' => __('Health warnings of emergency conditions. The entire population is more likely to be affected.', 'air-quality-plugin'), 'google_api_error' => __('Something went wrong during retrieving information from google, try again', 'air-quality-plugin'), 'localization' => __('Localization', 'air-quality-plugin'), 'longitude' => __('Longitude', 'air-quality-plugin'), 'latitude' => __('Latitude', 'air-quality-plugin'), 'weather' => __('Weather info', 'air-quality-plugin'), 'settings' => __('Settings', 'air-quality-plugin'), 'save' => __('Save', 'air-quality-plugin'), ); wp_enqueue_script('pk-aqp-widget-script', PK_AQP_DIR_PATH . 'js/script-widget.js', array('jquery'), PK_AQP_VERSION); wp_localize_script('pk-aqp-widget-script', 'pk_aqp_script_localization', $script_localization_array); $protocol = isset( $_SERVER["HTTPS"]) ? 'https://' : 'http://'; $params = array( 'ajax_url' => admin_url( 'admin-ajax.php', $protocol ), 'plugin_url' => PK_AQP_DIR_PATH ); wp_localize_script( 'pk-aqp-widget-script', 'pk_aqp_variables', $params ); $options = get_option('pk_aqp_options'); if ($options['user_can_set'] && is_user_logged_in()) { $user = wp_get_current_user(); if (get_user_meta($user->ID, 'weather-info', true)) { $display_weather_info = get_user_meta($user->ID, 'weather-info', true); } else { $display_weather_info = false; } } else { $display_weather_info = $options['weather_info']; } $aq_data = json_decode($data_json); $last_update = $aq_data->data->time->s; $last_update = date('d-m-y H:i', strtotime($last_update)); $time_zone = $aq_data->data->time->tz; $place = $aq_data->data->city->name; $aqi = $aq_data->data->aqi; $iaqi = $aq_data->data->iaqi; $co = isset($iaqi->co->v) ? $iaqi->co->v : false; $humidity = isset($iaqi->h->v) ? round($iaqi->h->v) : false; $no2 = isset($iaqi->no2->v) ? $iaqi->no2->v : false; $o3 = isset($iaqi->o3->v) ? $iaqi->o3->v : false; $pressure = isset($iaqi->p->v) ? round($iaqi->p->v) : false; $pm10 = isset($iaqi->pm10->v) ? $iaqi->pm10->v : false; $pm25 = isset($iaqi->pm25->v) ? $iaqi->pm25->v : false; $so2 = isset($iaqi->so2->v) ? $iaqi->so2->v : false; $temperature = isset($iaqi->t->v) ? round($iaqi->t->v, 2) : false; $wind = isset($iaqi->w->v) ? round($iaqi->w->v, 2) : false; $wind_direction = isset($iaqi->wd->v) ? round($iaqi->wd->v) : false; ?>
= __('Please set api key for waqi.info in settings', 'air-quality-plugin') ?>
= __('The administrator has not set up plugin properly yet so it is not working', 'air-quality-plugin') ?>
= __('Please check your waqi.info api key. It seems that wrong api key was given', 'air-quality-plugin') ?>
= __('There was an error during connecting to API', 'air-quality-plugin') ?>: = $response->data ?>
= __('There was an error during connecting to API', 'air-quality-plugin') ?>
= __('There was an error during connecting to API', 'air-quality-plugin') ?>: = $error ?>