summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/UsesWordPressScripts.php4
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(