plugin_dir_url()
最后更新于:2021-11-27 18:46:45
plugin_dir_url( string$file)Get the URL directory path (with trailing slash) for the plugin __FILE__ passed in.
参数
- $file
-
(string) (Required) The filename of the plugin (__FILE__).
响应
(string) the URL path of the directory that contains the plugin.
源文件
文件: gc-includes/plugin.php
function plugin_dir_url( $file ) {
return trailingslashit( plugins_url( '', $file ) );
}