Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: Where i

@danbp

Participant

Salut,

the problem is that js is only loaded on the original modification page. To get the new UI, you have to use another filter.

https://buddypress.trac.wordpress.org/browser/trunk/src/bp-core/bp-core-avatars.php#L1833

Soufflé par @imath despite the heat (we :sweat: in Paris today)

function change_profile_picture(){         
        add_action( 'bp_template_content', 'change_profile_picture_screen_content' );
		xprofile_screen_change_avatar();   
}
add_filter('bp_avatar_is_front_edit', 'filter_changeavatar_template');

You would probably also remove the original Change Avatar tab from Profile subnav ? Use this:

function bpfr_remove_change_avatar_tab() {
global $bp;
	bp_core_remove_subnav_item( 'profile', 'change-avatar' );
}
add_action( 'bp_ready', 'bpfr_remove_change_avatar_tab', 15 );

Have fun !

Skip to toolbar