Ticket #4948: 4948.01.patch
File 4948.01.patch, 1.1 KB (added by , 12 years ago) |
---|
-
bp-core/bp-core-avatars.php
function bp_core_avatar_url() { 848 848 if ( defined( 'BP_AVATAR_URL' ) ) { 849 849 $baseurl = BP_AVATAR_URL; 850 850 } else { 851 // If multisite, and we're not on the BP root blog, switch to it 852 if ( is_multisite() && ! bp_is_root_blog() ) { 853 switch_to_blog( bp_get_root_blog_id() ); 854 } 855 851 856 // Get upload directory information from current site 852 857 $upload_dir = wp_upload_dir(); 853 858 … … function bp_core_avatar_url() { 862 867 if ( is_ssl() ) 863 868 $baseurl = str_replace( 'http://', 'https://', $baseurl ); 864 869 865 // If multisite, and current blog does not match root blog, make adjustments866 if ( is_multisite() && bp_get_root_blog_id() != get_current_blog_id() )867 $baseurl = trailingslashit( get_blog_option( bp_get_root_blog_id(), 'home' ) ) . get_blog_option( bp_get_root_blog_id(), 'upload_path' );868 870 } 871 872 // Will bail if not switched 873 restore_current_blog(); 869 874 } 870 875 871 876 // Stash in $bp for later use