From 96d9aa75ae31e42a1075e49fd94a67eeade157d6 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Thu, 22 Dec 2005 05:18:18 +0000 Subject: [PATCH] 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 --- wp-includes/functions.php | 1 + 1 file changed, 1 insertion(+) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index b78612454b..ad79494443 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -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; }