WordPress.org

Make WordPress Core

Ticket #19388: plugin_basename.diff

File plugin_basename.diff, 828 bytes (added by damianzaremba, 3 years ago)
  • wp-includes/plugin.php

     
    566566        $plugin_dir = preg_replace('|/+|','/', $plugin_dir); // remove any duplicate slash 
    567567        $mu_plugin_dir = str_replace('\\','/',WPMU_PLUGIN_DIR); // sanitize for Win32 installs 
    568568        $mu_plugin_dir = preg_replace('|/+|','/', $mu_plugin_dir); // remove any duplicate slash 
    569         $file = preg_replace('#^' . preg_quote($plugin_dir, '#') . '/|^' . preg_quote($mu_plugin_dir, '#') . '/#','',$file); // get relative path from plugins dir 
     569        $file = preg_replace('#^' . preg_quote($plugin_dir, '#') . '|^' . preg_quote($mu_plugin_dir, '#') . '#','',$file); // get relative path from plugins dir 
    570570        $file = trim($file, '/'); 
    571571        return $file; 
    572572}