Fix for hardcoded uploads dir in User Avatar plugin
-
This plugin wrongly uses a hardcoded reference to the wp-content and uploads dirs when creating the URL to display avatars.
The path and URL used for the wp-content dir should be dynamic, because it can be customized in wp-config.php. In this case the upload dir is referenced with the wp-content dir hardcoded in the URL.
Also, the plugin uses get_site_url() to create the URL for the upload dir. Apart from the fact that the upload dir can be found much easier (and correctly) using wp_upload_dir(), ‘siteurl’ and ‘home’ are two different things in WordPress; siteurl is where WordPress lives, home is the home URL of the website. These can be different when giving WordPress its own directory.
A patch to fix this can be found here:
https://gist.github.com/3705726
Hopefully you will be able to patch this soon, it is a great plugin!
- The topic ‘Fix for hardcoded uploads dir in User Avatar plugin’ is closed to new replies.