Unable to enqueue/register external files
-
In my functions.php I add the following:
// Google’s CDN for jQuery
wp_deregister_script(‘jquery’);
wp_register_script(‘jquery’, “http” . ($_SERVER[‘SERVER_PORT’] == 443 ? “s” : “”) . “://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js”, false, ‘2.1.0’, false);// Twitter API
wp_enqueue_script(‘twitter’, ‘http’ . ($_SERVER[‘SERVER_PORT’] == 443 ? ‘s’ : ”) . ‘://platform.twitter.com/widgets.js’, false, false, true);The plugin causes the site to look for locally hosted files instead of on the externally host.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Unable to enqueue/register external files’ is closed to new replies.