Make template() compatible with wp admin

This commit is contained in:
Kim Helge Frimanslund
2018-05-06 13:42:31 +02:00
parent b1f645b825
commit 9a4b81c43a

View File

@@ -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();
}