Reduce consecutive backslashes to one backslash. Handy when escaped windows paths are passed in.
git-svn-id: http://svn.automattic.com/wordpress/trunk@3340 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
2a1cd8b2cd
commit
65223a924f
|
@ -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