Uses
Uses | Description |
---|---|
wp-includes/formatting.php: trailingslashit() | Appends a trailing slash. |
wp-includes/link-template.php: plugins_url() | Retrieves a URL within the plugins or mu-plugins directory. |
Get the URL directory path (with trailing slash) for the plugin __FILE__ passed in.
(string) (Required) The filename of the plugin (__FILE__).
(string) the URL path of the directory that contains the plugin.
File: wp-includes/plugin.php
function plugin_dir_url( $file ) { return trailingslashit( plugins_url( '', $file ) ); }
Version | Description |
---|---|
2.8.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/plugin_dir_url