A WordPress-centric search engine for devs and theme authors



plugin_dir_path ›

Since2.8.0
Deprecatedn/a
plugin_dir_path ( $file )
Parameters:
  • (string) $file The filename of the plugin (__FILE__).
    Required: Yes
Returns:
  • (string) the filesystem path of the directory that contains the plugin.
Defined at:
Codex:

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



Source

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