/** * Load scripts for the front end. * * @since 1.0 * @access public * @return void */ function hoot_base_enqueue_scripts() { /* Load jquery */ wp_enqueue_script('jquery'); /* Load modernizr */ $script_uri = hoot_locate_script('js/modernizr.custom'); wp_enqueue_script('modernizr', $script_uri, array(), '2.8.3'); /* Load Superfish and WP's hoverIntent */ // WordPress prior to v3.6 uses an older version of HoverIntent which doesn't support event delegation :( wp_enqueue_script('hoverIntent'); $script_uri = hoot_locate_script('js/jquery.superfish'); wp_enqueue_script('superfish', $script_uri, array('jquery', 'hoverIntent'), '1.7.5', true); /* Load lightSlider if 'light-slider' is active. */ if (current_theme_supports('light-slider')) { $script_uri = hoot_locate_script('js/jquery.lightSlider'); wp_enqueue_script('lightSlider', $script_uri, array('jquery'), '1.1.1', true); } /* Load fitvids */ $script_uri = hoot_locate_script('js/jquery.fitvids'); wp_enqueue_script('fitvids', $script_uri, array(), '1.1', true); /* Load Theme Javascript */ $script_uri = hoot_locate_script('js/hoot.theme'); wp_enqueue_script('hoot-theme', $script_uri, array(), THEME_VERSION, true); /* Localize Theme Javascript - Must be called after the script has been registered. */ hoot_localize_theme_script(); }
/** * Load scripts for the front end. * * @since 1.0 * @access public * @return void */ function hoot_base_enqueue_scripts() { /* Gets ".min" suffix. */ $suffix = hoot_get_min_suffix(); /* Load jquery */ wp_enqueue_script('jquery'); /* Load modernizr */ wp_enqueue_script('modernizr', trailingslashit(THEME_URI) . "js/modernizr.custom{$suffix}.js", array(), '2.8.3'); /* Load Superfish and WP's hoverIntent */ // WordPress prior to v3.6 uses an older version of HoverIntent which doesn't support event delegation :( wp_enqueue_script('hoverIntent'); wp_enqueue_script('superfish', trailingslashit(THEME_URI) . "js/jquery.superfish{$suffix}.js", array('jquery', 'hoverIntent'), '1.7.5', true); /* Load slickSlider if 'slickSlider' is active. */ if (current_theme_supports('slick-slider')) { wp_enqueue_script('slick', trailingslashit(THEME_URI) . "js/slick{$suffix}.js", array('jquery'), '1.5.9', true); } /* Load fitvids */ wp_enqueue_script('fitvids', trailingslashit(THEME_URI) . "js/jquery.fitvids{$suffix}.js", array(), '1.1', true); /* Load Theme Javascript */ wp_enqueue_script('hoot-theme', trailingslashit(THEME_URI) . "js/hoot.theme{$suffix}.js", array(), THEME_VERSION, true); // Localize Theme Javascript - Must be called after the script has been registered. hoot_localize_theme_script(); }