__DIR__
is rather new and not always supported. Use dirname( __FILE__ )
.
plugins_url()
is using …
$folder = dirname(plugin_basename($plugin));
… so yes, it is safe.
Just use plugins_url( 'subfolder/file.css', dirname( __FILE__ ) )
__DIR__
is rather new and not always supported. Use dirname( __FILE__ )
.
plugins_url()
is using …
$folder = dirname(plugin_basename($plugin));
… so yes, it is safe.
Just use plugins_url( 'subfolder/file.css', dirname( __FILE__ ) )