Skip to:
Content

BuddyPress.org

Changeset 2209 for trunk/bp-xprofile.php


Ignore:
Timestamp:
12/27/2009 10:41:10 AM (16 years ago)
Author:
apeatling
Message:

Single WP support. Yes, you read that correctly.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-xprofile.php

    r2179 r2209  
    10371037        $directory = 'avatars';
    10381038
    1039     $path  = get_blog_option( BP_ROOT_BLOG, 'upload_path' );
    1040     $newdir = WP_CONTENT_DIR . str_replace( 'wp-content', '', $path );
    1041     $newdir .= '/avatars/' . $user_id;
    1042 
    1043     $newbdir = $newdir;
    1044 
    1045     if ( !file_exists( $newdir ) )
    1046         @wp_mkdir_p( $newdir );
    1047 
    1048     $newurl = WP_CONTENT_URL . '/blogs.dir/' . BP_ROOT_BLOG . '/files/' . $directory . '/' . $user_id;
     1039    $path  = BP_AVATAR_UPLOAD_PATH . '/avatars/' . $user_id;
     1040    $newbdir = $path;
     1041
     1042    if ( !file_exists( $path ) )
     1043        @wp_mkdir_p( $path );
     1044
     1045    $newurl = str_replace( WP_CONTENT_DIR, WP_CONTENT_URL, $path );
    10491046    $newburl = $newurl;
    10501047    $newsubdir = '/avatars/' . $user_id;
    10511048
    1052     return apply_filters( 'xprofile_avatar_upload_dir', array( 'path' => $newdir, 'url' => $newurl, 'subdir' => $newsubdir, 'basedir' => $newbdir, 'baseurl' => $newburl, 'error' => false ) );
     1049    return apply_filters( 'xprofile_avatar_upload_dir', array( 'path' => $path, 'url' => $newurl, 'subdir' => $newsubdir, 'basedir' => $newbdir, 'baseurl' => $newburl, 'error' => false ) );
    10531050}
    10541051
Note: See TracChangeset for help on using the changeset viewer.