From 1b137868fbe7fbf4ceb8d79bdeae679942015a4f Mon Sep 17 00:00:00 2001 From: Dan Head Date: Wed, 24 Jun 2020 19:27:58 +0100 Subject: [PATCH] remove jquery --- theme/functions.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/theme/functions.php b/theme/functions.php index e01b9ec..0d8afd2 100644 --- a/theme/functions.php +++ b/theme/functions.php @@ -186,3 +186,11 @@ function windycoys_jetpack_custom_image($media, $post_id, $args) { } } add_filter('jetpack_images_get_images', 'windycoys_jetpack_custom_image', 10, 3); + +function windycoys_strip_scripts(&$scripts) { + if(!is_admin()){ + $scripts->remove('jquery'); + } +} + +add_filter('wp_default_scripts', 'windycoys_strip_scripts');