summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Weipert <git@mail.dweipert.de>2024-06-03 13:34:07 +0200
committerDaniel Weipert <git@mail.dweipert.de>2024-06-03 13:34:07 +0200
commit9a25f1f47e9df0b1c09f666741b49e370ccc6440 (patch)
tree064a4ac792bbcd48d62c8782b239d2f049f1495b
parent3d94a6d9b74be03b58049dd24ff59145f24b36a1 (diff)
fixes asset.php path for scripts version 28HEADv2.1.0main
-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(