Hello,
I built a plugin which provides a custom block for the blocks
-field type. It comes with a CSS file. Using the information in the docs (plugin-assets) I was able to get it to work and call the right path:
<?= css([
'/media/plugins/wenzels-design/picture-list-block/picture-list-plugin.css',
'assets/foundation.css'
]) ?>
which generates this HTML on my test server:
<link href="http://wp10605943.server-he.de/media/plugins/wenzels-design/picture-list-block/picture-list-plugin.css" rel="stylesheet">
<link href="http://wp10605943.server-he.de/assets/foundation.css" rel="stylesheet">
According to the docs page linked above the URL should contain a timestamp, but it doesn’t. What am I doing wrong? Do I need to register the CSS file in the plugin’s index.php?
Also, is there a way to use the css('@auto')
-feature to only include the CSS file when it is actually needed?