idleberg / php-wordpress-vite-assets

Injects assets from a Vite manifest to the Wordpress head, supports themes and plugins
https://packagist.org/packages/idleberg/wordpress-vite-assets
MIT License
130 stars 12 forks source link

Fix small typo: Use get_stylesheet_directory_uri() #6

Closed mandrasch closed 1 year ago

mandrasch commented 1 year ago

Description of the Change

get_stylesheet_directory() outputs a internal file path, but for base url get_stylesheet_directory_uri() is the correct function (and works in my local test setup).

Release Notes

Fix function mentioned in docs: Use get_stylesheet_directory_uri() for baseUrl setting

https://developer.wordpress.org/reference/functions/get_stylesheet_directory_uri/

(Thanks for providing as open source! 👍 👍 Used in https://github.com/mandrasch/ddev-wp-vite-demo)

idleberg commented 1 year ago

Thank you!