Created
September 12, 2012 10:09
-
-
Save bvandreunen/3705726 to your computer and use it in GitHub Desktop.
User avatar upload dir patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- /Users/superinteractive/Downloads/user-avatar/user-avatar.php 2012-07-17 17:46:44.000000000 +0200 | |
+++ ./www/app/www/content/plugins/user-avatar/user-avatar.php 2012-09-12 12:23:34.000000000 +0200 | |
@@ -591,9 +591,10 @@ | |
if( $avatar_img = user_avatar_avatar_exists( $item_id ) ): | |
- $avatar_src = get_site_url()."/wp-content/uploads/avatars/".$item_id."/".$avatar_img; | |
+ $upload_dir = wp_upload_dir(); | |
+ $avatar_src = $upload_dir['baseurl']."/avatars/".$item_id."/".$avatar_img; | |
if(function_exists('is_subdomain_install') && !is_subdomain_install()) | |
- $avatar_src = "/wp-content/uploads/avatars/".$item_id."/".$avatar_img; | |
+ $avatar_src = $upload_dir['baseurl']."/avatars/".$item_id."/".$avatar_img; | |
$avatar_folder_dir = USER_AVATAR_UPLOAD_PATH."{$item_id}/"; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment