public function purge_transients()
{
// First check for the filter to avoid this action overall.
if (false === ($clear = apply_filters('airplane_mode_purge_transients', true))) {
return;
}
// Purge the transients related to updates when disabled.
if (!$this->enabled()) {
delete_site_transient('update_core');
delete_site_transient('update_plugins');
delete_site_transient('update_themes');
delete_site_transient('wporg_theme_feature_list');
}
}