wpseek.com
Uma área de pesquisa sobre o WordPress para devs e autores do tema



plugin_dir_path › WordPress Function

Desde2.8.0
Obsoleton/a
plugin_dir_path ( $file )
Parâmetros:
  • (string) $file The filename of the plugin (__FILE__).
    Required: Yes
Retorna:
  • (string) the filesystem path of the directory that contains the plugin.
Definido em:
Codex:

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



Fonte

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