diff options
author | Daniel Weipert <git@mail.dweipert.de> | 2024-06-03 13:34:07 +0200 |
---|---|---|
committer | Daniel Weipert <git@mail.dweipert.de> | 2024-06-03 13:34:07 +0200 |
commit | 9a25f1f47e9df0b1c09f666741b49e370ccc6440 (patch) | |
tree | 064a4ac792bbcd48d62c8782b239d2f049f1495b /src | |
parent | 3d94a6d9b74be03b58049dd24ff59145f24b36a1 (diff) |
Diffstat (limited to 'src')
-rw-r--r-- | src/UsesWordPressScripts.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/UsesWordPressScripts.php b/src/UsesWordPressScripts.php index c565575..dd35602 100644 --- a/src/UsesWordPressScripts.php +++ b/src/UsesWordPressScripts.php @@ -17,7 +17,7 @@ trait UsesWordPressScripts */ public function enqueueScript(string $handle, string $asset, array $deps = [], bool $inFooter = false) { - $assetBaseName = pathinfo($asset, PATHINFO_FILENAME); + $assetBaseName = str_replace('.' . pathinfo($asset, PATHINFO_EXTENSION), '', $asset); $meta = $this->assetsMeta($assetBaseName); wp_enqueue_script( @@ -37,7 +37,7 @@ trait UsesWordPressScripts */ public function enqueueStyle(string $handle, string $asset, array $deps = [], string $media = 'all') { - $assetBaseName = pathinfo($asset, PATHINFO_FILENAME); + $assetBaseName = str_replace('.' . pathinfo($asset, PATHINFO_EXTENSION), '', $asset); $meta = $this->assetsMeta($assetBaseName); wp_enqueue_style( |