blob: 21cc5010b34224b21ec23ca7c856c934f131fd36 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
<?php
namespace Dweipert\WpEnqueueAssets;
trait ThemeUsesWordPressScripts
{
use UsesWordPressScripts;
/**
* @param string $asset
*
* @return string
*/
public function assetsUrl(string $asset): string
{
return get_stylesheet_directory_uri() . "/{$this->buildDir}/$asset";
}
/**
* @param string $asset
*
* @return array
*/
public function assetsMeta(string $asset): array
{
return include get_stylesheet_directory() . "/{$this->buildDir}/$asset.asset.php";
}
}
|