bp_avatar_template_check

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

Description

bp_avatar_template_check(); 

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


Usage

  1. if ( !function_exists( 'bp_avatar_template_check' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-core/bp-core-avatars.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bp_avatar_template_check(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/bp-core/bp-core-avatars.php  
  1. function bp_avatar_template_check() { 
  2. if ( ! bp_avatar_is_front_edit() ) { 
  3. return; 
  4.  
  5. if ( ! did_action( 'bp_attachments_avatar_check_template' ) ) { 
  6. bp_attachments_get_template_part( 'avatars/index' );