@juhanib
10 years, 5 months ago
I found a working version from here:
http://pastebin.com/ta67ezs0
I was able to get the avatar form to show up with this snippet:
function setup_custom_nav() { global $bp; bp_core_new_subnav_item( array( 'name' => __( 'Change Avatar', 'buddypress' ), 'slug' => 'change-avatar', 'parent_url' => $bp->loggedin_user->domain . 'settings/', 'parent_slug' => 'settings', 'screen_function' => 'ca_screen_function', 'position' => 30, ) ); } add_action( 'bp_setup_nav', 'setup_custom_nav'); function ca_screen_function() { add_action( 'bp_template_content', 'change_profile_picture_screen_content' ); bp_core_load_template( apply_filters( 'xprofile_template_change_avatar', 'members/single/plugins' ) ); xprofile_screen_change_avatar(); } function change_profile_picture_screen_content() { bp_get_template_part( 'members/single/profile/change-avatar' ); }
But when I try to upload a new avatar the resizing/cropping screen doesn’t show up.