Skip to content

Commit ab37638

Browse files
authored
Merge pull request roots#2068 from kimhf/template-admin-compatibility
Make template() compatible with wp admin
2 parents b1f645b + 9a4b81c commit ab37638

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/helpers.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ function config($key = null, $default = null)
5252
*/
5353
function template($file, $data = [])
5454
{
55-
if (remove_action('wp_head', 'wp_enqueue_scripts', 1)) {
55+
if (!is_admin() && remove_action('wp_head', 'wp_enqueue_scripts', 1)) {
5656
wp_enqueue_scripts();
5757
}
5858

0 commit comments

Comments
 (0)