bp_avatar_template_check()

Trick to check if the theme’s BuddyPress templates are up to date.

Description

If the "avatar templates" are not including the new template tag, this will help users to get the avatar UI.

Source

File: bp-core/bp-core-avatars.php

2172
2173
2174
2175
2176
2177
2178
2179
2180
function bp_avatar_template_check() {
    if ( ! bp_avatar_is_front_edit() ) {
        return;
    }
 
    if ( ! did_action( 'bp_attachments_avatar_check_template' ) ) {
        bp_attachments_get_template_part( 'avatars/index' );
    }
}

Changelog

Changelog
Version Description
BuddyPress 2.3.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.