From 85db2c777a3e0ce3392524157890f6eed02863c8 Mon Sep 17 00:00:00 2001 From: Kim Helge Frimanslund <1223194+kimhf@users.noreply.github.com> Date: Sun, 6 May 2018 13:42:31 +0200 Subject: [PATCH] Make template() compatible with wp admin --- app/helpers.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers.php b/app/helpers.php index d5d54460..f2ab4a93 100644 --- a/app/helpers.php +++ b/app/helpers.php @@ -52,7 +52,7 @@ function config($key = null, $default = null) */ function template($file, $data = []) { - if (remove_action('wp_head', 'wp_enqueue_scripts', 1)) { + if (!is_admin() && remove_action('wp_head', 'wp_enqueue_scripts', 1)) { wp_enqueue_scripts(); }