函数原型
plugins_url( string $path = ”, string $plugin = ” ): string
函数描述
Retrieves a URL within the plugins or mu-plugins directory.
是否弃用
未弃用
函数参数
-
$path
string
Optional - Extra path appended to the end of the URL, including the relative directory if $plugin is supplied.
Default:
'' -
$plugin
string
Optional - A full path to a file inside a plugin or mu-plugin.
The URL will be relative to its directory.
Typically this is done by passing__FILE__as the argument.Default:
''
函数返回值
string Plugins URL link with optional paths appended.
函数位置
File: wp-includes/link-template.php.
函数源码
return apply_filters( 'plugins_url', $url, $path, $plugin );源码链接
变更日志
| Version | Description |
|---|---|
| 2.6.0 | Introduced. |

