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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -76,8 +76,8 @@ class Squat_Radar_Widget extends WP_Widget {
|
||||||
$connector = new Squat_Radar_Connector();
|
$connector = new Squat_Radar_Connector();
|
||||||
|
|
||||||
$languages = apply_filters('wpml_active_languages', NULL);
|
$languages = apply_filters('wpml_active_languages', NULL);
|
||||||
$languages = array_keys($languages);
|
$languages = is_array($languages) ? array_keys($languages) : [];
|
||||||
$languages = array_merge($instance['url']['keys']['language'], (array) $languages);
|
$languages = array_merge($instance['url']['keys']['language'], $languages);
|
||||||
foreach ($languages as $language) {
|
foreach ($languages as $language) {
|
||||||
try {
|
try {
|
||||||
// Force update. Don't set expire.
|
// Force update. Don't set expire.
|
||||||
|
|
Loading…
Reference in a new issue