Use PLUGINDIR in plugin_basename(). Props hansengel. fixes #5665
git-svn-id: http://svn.automattic.com/wordpress/trunk@6629 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
f78af1cbe5
commit
f8ab885ab0
|
@ -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