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:
parent
2992408edd
commit
d4c55e7b87
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user