public function toggle_css()
{
// Don't display CSS on the front-end if the admin bar is not loading.
if (!is_admin() && !is_admin_bar_showing()) {
return;
}
// Set a suffix for loading the minified or normal.
$file = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? 'airplane-mode.css' : 'airplane-mode.min.css';
// Set a version for browser caching.
$vers = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? time() : AIRMDE_VER;
// Load the CSS file itself.
wp_enqueue_style('airplane-mode', plugins_url('/lib/css/' . $file, __FILE__), array(), $vers, 'all');
}