diff --git a/lib/assets.php b/lib/assets.php index c090cfb5e5..775798c08c 100644 --- a/lib/assets.php +++ b/lib/assets.php @@ -53,13 +53,14 @@ public function getPath($key = '', $default = null) { } function asset_path($filename) { - $dist_path = get_template_directory_uri() . '/dist/'; + $dist_dir = '/dist/'; + $dist_path = get_template_directory_uri() . $dist_dir; $directory = dirname($filename) . '/'; $file = basename($filename); static $manifest; if (empty($manifest)) { - $manifest_path = get_template_directory() . '/dist/assets.json'; + $manifest_path = get_template_directory() . $dist_dir . 'assets.json'; $manifest = new JsonManifest($manifest_path); } @@ -130,7 +131,7 @@ function jquery_local_fallback($src, $handle = null) { static $add_jquery_fallback = false; if ($add_jquery_fallback) { - echo '' . "\n"; + echo '' . "\n"; $add_jquery_fallback = false; } @@ -171,4 +172,3 @@ function ga() { if (GOOGLE_ANALYTICS_ID) { add_action('wp_footer', __NAMESPACE__ . '\\google_analytics', 20); } -