wpseek.com
WordPress开发者和主题制作者的搜索引擎



plugin_dir_path › WordPress Function

Since2.8.0
已弃用n/a
plugin_dir_path ( $file )
参数:
  • (string) $file The filename of the plugin (__FILE__).
    Required: Yes
返回:
  • (string) the filesystem path of the directory that contains the plugin.
定义在:
文档:

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



源码

function plugin_dir_path( $file ) {
	return trailingslashit( dirname( $file ) );
}