plugin_dir_path()

最后更新于:2021-11-27 18:46:37

plugin_dir_path( string$file)

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

参数

$file

(string) (Required) The filename of the plugin (__FILE__).

响应

(string) the filesystem path of the directory that contains the plugin.

源文件

文件: gc-includes/plugin.php

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