Changeset 6963
- Timestamp:
- 04/30/2013 12:51:09 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.7/bp-core/bp-core-avatars.php
r6884 r6963 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() ) { 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 854 859 // Directory does not exist and cannot be created 855 if ( ! empty( $upload_dir['error'] ) ) {860 if ( ! empty( $upload_dir['error'] ) ) { 856 861 $baseurl = ''; 857 862 … … 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
Note: See TracChangeset
for help on using the changeset viewer.