WPDev.one
Core Function
View Source on Trac ↗

plugin_dir_url()

plugin_dir_url( mixed $file )

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

Parameters 1 required

Name / Type Description
$file
string

The filename of the plugin (__FILE__).

Required

Return Value

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

Function Information

Since Version
2.8.0
Source File
wp-includes/plugin.php
Advertisement