A WordPress-centric search engine for devs and theme authors



plugin_dir_url ›

Since2.8.0
Deprecatedn/a
plugin_dir_url ( $file )
Parameters:
  • (string) $file The filename of the plugin (__FILE__).
    Required: Yes
Returns:
  • (string) the URL path of the directory that contains the plugin.
Defined at:
Codex:

Get the URL directory path (with trailing slash) for the plugin __FILE__ passed in.



Source

function plugin_dir_url( $file ) {
	return trailingslashit( plugins_url( '', $file ) );
}