Retrieves a URL within the plugins or mu-plugins directory.

Defaults to the plugins directory URL if no arguments are supplied.


  • Full name: plugin_url
  • Defined in: cms/core/Shared/Helpers/plugin.php

Parameters

Parameter Type Description
$path string Optional. Extra path appended to the end of the URL, including
the relative directory if $plugin is supplied. Default empty.
$plugin string Optional. A full path to a file inside a plugin or mu-plugin.
The URL will be relative to its directory. Default empty.
Typically, this is done by passing __FILE__ as the argument.

Return Value

string

Plugins URL link with optional paths appended.