Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/29/2020 03:38:06 PM (16 months ago)
Author:
imath
Message:

Move Avatars & Cover from xProfile to Members component : step 3

Move the Avatar upload directory filter from the xProfile functions to the Members functions.
Move the Avatar template functions from xProfile to the Members component.

See #8156

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/testcases/core/class-bp-attachment.php

    r11737 r12555  
    239239
    240240        /* No error */
    241         $user_avatar = $avatar_attachment->upload( $_FILES, 'xprofile_avatar_upload_dir' );
     241        $user_avatar = $avatar_attachment->upload( $_FILES, 'bp_members_avatar_upload_dir' );
    242242        $this->assertEquals( $user_avatar['file'], $bp->avatar->upload_path . '/avatars/' . $u1 .'/mystery-man.jpg' );
    243243
     
    245245        add_filter( 'bp_core_avatar_original_max_filesize', array( $this, 'max_filesize' ) );
    246246
    247         $user_avatar = $avatar_attachment->upload( $_FILES, 'xprofile_avatar_upload_dir' );
     247        $user_avatar = $avatar_attachment->upload( $_FILES, 'bp_members_avatar_upload_dir' );
    248248
    249249        remove_filter( 'bp_core_avatar_original_max_filesize', array( $this, 'max_filesize' ) );
     
    254254        $_FILES[ $avatar_attachment->file_input ]['type'] = 'application/pdf';
    255255
    256         $user_avatar = $avatar_attachment->upload( $_FILES, 'xprofile_avatar_upload_dir' );
     256        $user_avatar = $avatar_attachment->upload( $_FILES, 'bp_members_avatar_upload_dir' );
    257257        $this->assertFalse( empty( $user_avatar['error'] ) );
    258258
Note: See TracChangeset for help on using the changeset viewer.