Skip to content
This repository was archived by the owner on Sep 3, 2024. It is now read-only.

Commit 1486484

Browse files
authored
Add jQuery dependency on header assets
Included sample `header.js` file depends on jQuery, but it's not explicitly set on the `wq_enqueue_script` call
1 parent b63da55 commit 1486484

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/inc/assets.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ function voidx_assets_header() {
88

99
// Header script loading is simplistic in this starter kit but you may want to change what file is loaded based on various conditions; check out the footer asset loader for an example
1010
$file = 'x-header';
11-
wp_enqueue_script( 'voidx-header', get_stylesheet_directory_uri() . '/js/' . $file . '.js', $deps = array(), filemtime( get_template_directory() . '/js/' . $file . '.js' ), false );
11+
wp_enqueue_script( 'voidx-header', get_stylesheet_directory_uri() . '/js/' . $file . '.js', $deps = array('jquery'), filemtime( get_template_directory() . '/js/' . $file . '.js' ), false );
1212

1313
// Register and enqueue our main stylesheet with versioning based on last modified time
1414
wp_register_style( 'voidx-style', get_stylesheet_uri(), $dependencies = array(), filemtime( get_template_directory() . '/style.css' ) );

0 commit comments

Comments
 (0)