Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

User avatar upload dir patch

View user-avatar.patch
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
--- /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
Something went wrong with that request. Please try again.