forked from lino/radar-wp
Fix empty array warning, correct syntax for cron timing storage.
This commit is contained in:
parent
835e9fa332
commit
a34db48a4b
1 changed files with 4 additions and 4 deletions
|
@ -66,7 +66,7 @@ class Squat_Radar_Widget extends WP_Widget {
|
|||
}
|
||||
}
|
||||
}
|
||||
set_option('squat_radar_widget_cron_run', $last_run);
|
||||
add_option('squat_radar_widget_cron_run', $last_run);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -75,9 +75,9 @@ class Squat_Radar_Widget extends WP_Widget {
|
|||
protected static function cache_refresh($instance) {
|
||||
$connector = new Squat_Radar_Connector();
|
||||
|
||||
$languages = apply_filters( 'wpml_active_languages', NULL);
|
||||
$languages = array_keys($languages);
|
||||
$languages = array_merge($instance['url']['keys']['language'], (array) $languages);
|
||||
$languages = apply_filters('wpml_active_languages', NULL);
|
||||
$languages = is_array($languages) ? array_keys($languages) : [];
|
||||
$languages = array_merge($instance['url']['keys']['language'], $languages);
|
||||
foreach ($languages as $language) {
|
||||
try {
|
||||
// Force update. Don't set expire.
|
||||
|
|
Loading…
Reference in a new issue