diff --git a/wp-content/themes/cosmopet/global-functions/multisite-functions.php b/wp-content/themes/cosmopet/global-functions/multisite-functions.php index 8140955..72f6d82 100644 --- a/wp-content/themes/cosmopet/global-functions/multisite-functions.php +++ b/wp-content/themes/cosmopet/global-functions/multisite-functions.php @@ -27,6 +27,7 @@ add_filter('timber/twig', function (\Twig\Environment $twig) { global $site_env; $twig->addGlobal('site_region', $site_env->site_region); $twig->addGlobal('site_env', $site_env); + $twig->addGlobal('site_mode', $site_env->site_mode); $twig->addGlobal('header_scripts', get_field('header_scripts', 'option')); return $twig; }); diff --git a/wp-content/themes/cosmopet/templates/layout.twig b/wp-content/themes/cosmopet/templates/layout.twig index de210ec..a34a64f 100644 --- a/wp-content/themes/cosmopet/templates/layout.twig +++ b/wp-content/themes/cosmopet/templates/layout.twig @@ -1,12 +1,14 @@ + {{ function('wp_head') }} {{ function('wp_title') }} + {% if site_mode == 'production' %} {{ header_scripts }} {% endif %}