From b5bb95199bc0c5553f4ebc5844a276413ba52828 Mon Sep 17 00:00:00 2001 From: Anders Hassis Date: Sun, 10 Mar 2013 20:51:56 +0100 Subject: [PATCH] New way of getting the MF_BASENAME so it works with symlinked directories --- mf_constants.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mf_constants.php b/mf_constants.php index 7ab07dd..6ed7d7f 100644 --- a/mf_constants.php +++ b/mf_constants.php @@ -3,7 +3,7 @@ //useful for get quickly the path for images/javascript files and css files //return something like: http://wordpress.local/wp-content/plugins/Magic-Fields/ -define('MF_BASENAME',plugins_url().'/'.str_replace(basename(__FILE__),"",plugin_basename(__FILE__))); +define('MF_BASENAME',plugins_url().'/'.basename(dirname(__FILE__)).'/'); define('MF_URL',MF_BASENAME); //return something like: /Users/user/sites/wordpres/wp-content/plugins/Magic-Fields