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

You appear to be a bot. Output may be restricted

Description

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

Usage

$string = plugin_dir_url( $file );

Parameters

$file
( string ) required – The filename of the plugin (__FILE__).

Returns

string the URL path of the directory that contains the plugin.

Source

File name: wordpress/wp-includes/plugin.php
Lines:

1 to 3 of 3
function plugin_dir_url( $file ) {
  return trailingslashit( plugins_url( '', $file ) );
}
 

 View on GitHub View on Trac