bp_core_set_avatar_constants

Set up the constants we need for avatar support.

Description

bp_core_set_avatar_constants(); 

Usage

  1. if ( !function_exists( 'bp_core_set_avatar_constants' ) ) { 
  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_core_set_avatar_constants(); 
  7.  

Defined (1)

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

/bp-core/bp-core-avatars.php  
  1. function bp_core_set_avatar_constants() { 
  2.  
  3. $bp =buddypress); 
  4.  
  5. if ( !defined( 'BP_AVATAR_THUMB_WIDTH' ) ) 
  6. define( 'BP_AVATAR_THUMB_WIDTH', 50 ); 
  7.  
  8. if ( !defined( 'BP_AVATAR_THUMB_HEIGHT' ) ) 
  9. define( 'BP_AVATAR_THUMB_HEIGHT', 50 ); 
  10.  
  11. if ( !defined( 'BP_AVATAR_FULL_WIDTH' ) ) 
  12. define( 'BP_AVATAR_FULL_WIDTH', 150 ); 
  13.  
  14. if ( !defined( 'BP_AVATAR_FULL_HEIGHT' ) ) 
  15. define( 'BP_AVATAR_FULL_HEIGHT', 150 ); 
  16.  
  17. if ( !defined( 'BP_AVATAR_ORIGINAL_MAX_WIDTH' ) ) 
  18. define( 'BP_AVATAR_ORIGINAL_MAX_WIDTH', 450 ); 
  19.  
  20. if ( !defined( 'BP_AVATAR_ORIGINAL_MAX_FILESIZE' ) ) { 
  21.  
  22. if ( ! defined( 'BP_SHOW_AVATARS' ) ) { 
  23. define( 'BP_SHOW_AVATARS', bp_get_option( 'show_avatars' ) );