/** * States if the browser is IE by returning properties, otherwise false. */ public function theme_essential_ie_properties() { $properties = core_useragent::check_ie_properties(); // In /lib/classes/useragent.php. if (!is_array($properties)) { return false; } else { return $properties; } }
/** * States if the browser is IE by returning properties, otherwise false. */ static protected function ie_properties() { $properties = \core_useragent::check_ie_properties(); // In /lib/classes/useragent.php. if (!is_array($properties)) { return false; } else { return $properties; } }
function theme_essential_page_init(moodle_page $page) { global $CFG; $page->requires->jquery(); $page->requires->jquery_plugin('ui', 'core'); $properties = core_useragent::check_ie_properties(); // In /lib/classes/useragent.php. if (is_array($properties) && $properties['version'] <= 8.0) { $page->requires->jquery_plugin('html5shiv', 'theme_essential'); } $page->requires->jquery_plugin('bootstrap', 'theme_essential'); $page->requires->jquery_plugin('breadcrumb', 'theme_essential'); $page->requires->jquery_plugin('fitvids', 'theme_essential'); $page->requires->jquery_plugin('antigravity', 'theme_essential'); }