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