Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/17/2015 06:42:02 PM (10 years ago)
Author:
imath
Message:

Do some clean up in avatar uploads directory filters

Let WordPress creates the uploads directory for us.

Props johnjamesjacoby

See #6278

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-members/bp-members-functions.php

    r9611 r9625  
    21602160    }
    21612161
    2162     $path  = bp_core_avatar_upload_path() . '/avatars/signups/' . $bp->signup->avatar_dir;
    2163     $newbdir = $path;
    2164 
    2165     if ( ! file_exists( $path ) ) {
    2166         @wp_mkdir_p( $path );
    2167     }
    2168 
    2169     $newurl = bp_core_avatar_url() . '/avatars/signups/' . $bp->signup->avatar_dir;
    2170     $newburl = $newurl;
    2171     $newsubdir = '/avatars/signups/' . $bp->signup->avatar_dir;
     2162    $directory = 'avatars/signups';
     2163    $path      = bp_core_avatar_upload_path() . '/' . $directory . '/' . $bp->signup->avatar_dir;
     2164    $newbdir   = $path;
     2165    $newurl    = bp_core_avatar_url() . '/' . $directory . '/' . $bp->signup->avatar_dir;
     2166    $newburl   = $newurl;
     2167    $newsubdir = '/' . $directory . '/' . $bp->signup->avatar_dir;
    21722168
    21732169    /**
     
    21842180        'basedir' => $newbdir,
    21852181        'baseurl' => $newburl,
    2186         'error' => false
     2182        'error'   => false
    21872183    ) );
    21882184}
Note: See TracChangeset for help on using the changeset viewer.