Reduce consecutive backslashes to one backslash. Handy when escaped windows paths are passed in.
git-svn-id: https://develop.svn.wordpress.org/trunk@3340 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
33562dafac
commit
96d9aa75ae
@ -2252,6 +2252,7 @@ function register_deactivation_hook($file, $function) {
|
||||
}
|
||||
|
||||
function plugin_basename($file) {
|
||||
$file = preg_replace('|\\\\+|', '\\\\', $file);
|
||||
$file = preg_replace('/^.*wp-content[\\\\\/]plugins[\\\\\/]/', '', $file);
|
||||
return $file;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user