Is there a perform that may return the equal of plugin_dir_path
but it surely being agnostic of a plugin / theme? JS scripts have to be enqueued as assets, as such, you can’t embrace their on-server path which is, say /var/www/html/wordpress/factor/thing2/script.js
, it must be the http://www.instance.com/factor/thing2/script.js
counterpart.