We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7013acc commit bc4eebcCopy full SHA for bc4eebc
inc/Services/Assets.php
@@ -71,6 +71,15 @@ public function register_assets(): void {
71
true
72
);
73
74
+ wp_add_inline_script(
75
+ 'scripts',
76
+ 'const THEME_DATA = ' . wp_json_encode(
77
+ [
78
+ 'themeUri' => get_template_directory_uri(),
79
+ ]
80
+ ),
81
+ );
82
+
83
// CSS
84
wp_register_style( 'theme-style', get_stylesheet_uri(), [], $version );
85
}
@@ -81,15 +90,6 @@ public function register_assets(): void {
90
public function enqueue_scripts(): void {
91
// JS
92
$this->assets_tools->enqueue_script( 'scripts' );
-
- wp_add_inline_script(
86
- 'scripts',
87
- 'const THEME_DATA = ' . wp_json_encode(
88
- [
89
- 'themeUri' => get_template_directory_uri(),
- ]
- ),
- );
93
94
95
/**
0 commit comments