Changeset 5924
- Timestamp:
- 08/23/2007 04:07:21 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/plugin.php
r5857 r5924 238 238 */ 239 239 function plugin_basename($file) { 240 $file = preg_replace('|\\\\+|', '\\\\', $file); 241 $file = preg_replace('/^.*wp-content[\\\\\/]plugins[\\\\\/]/', '', $file); 240 $file = str_replace('\\','/',$file); // sanitize for Win32 installs 241 $file = preg_replace('|/+|','/', $file); // remove any duplicate slash 242 $file = preg_replace('|^.*/wp-content/plugins/|','',$file); // get relative path from plugins dir 242 243 return $file; 243 244 }
Note: See TracChangeset
for help on using the changeset viewer.