WordPress at a glance

plugin_dir_url() WP 1.0

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

Works based on: plugins_url()

No Hooks.

Return

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

Usage

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

Code of plugin_dir_url: wp-includes/plugin.php VER 4.9.8

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

Related Functions

From tag: Link (URL)

More from category: Plugins, Hooks

No comments
    Hello, !     Log In . Register