Use PLUGINDIR in plugin_basename(). Props hansengel. fixes #5665

git-svn-id: https://develop.svn.wordpress.org/trunk@6629 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-01-16 19:11:15 +00:00
parent 2992408edd
commit d4c55e7b87
1 changed files with 1 additions and 1 deletions

View File

@ -448,7 +448,7 @@ function remove_action($tag, $function_to_remove, $priority = 10, $accepted_args
function plugin_basename($file) {
$file = str_replace('\\','/',$file); // sanitize for Win32 installs
$file = preg_replace('|/+|','/', $file); // remove any duplicate slash
$file = preg_replace('|^.*/wp-content/plugins/|','',$file); // get relative path from plugins dir
$file = preg_replace('|^.*/' . PLUGINDIR . '/|','',$file); // get relative path from plugins dir
return $file;
}