From 9cd7bdec08ab58bc8d83d39ccf5eea2346adba39 Mon Sep 17 00:00:00 2001 From: scribu Date: Sun, 17 Oct 2010 13:47:40 +0000 Subject: [PATCH] Apply filter in plugin_basename(). Props vladimir_kolesnikov. Fixes #13550 git-svn-id: https://develop.svn.wordpress.org/trunk@15829 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/plugin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/plugin.php b/wp-includes/plugin.php index 6e66d18d43..e7d3e83faf 100644 --- a/wp-includes/plugin.php +++ b/wp-includes/plugin.php @@ -555,7 +555,7 @@ function plugin_basename($file) { $mu_plugin_dir = preg_replace('|/+|','/', $mu_plugin_dir); // remove any duplicate slash $file = preg_replace('#^' . preg_quote($plugin_dir, '#') . '/|^' . preg_quote($mu_plugin_dir, '#') . '/#','',$file); // get relative path from plugins dir $file = trim($file, '/'); - return $file; + return apply_filters('plugin_basename', $file); } /**