bp_core_check_avatar_size

Is the file size of the current avatar upload permitted?.

Description

bp_core_check_avatar_size( (array) $file ); 

Parameters (1)

0. $file (array)
The $_FILES array.

Usage

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

Defined (1)

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

/bp-core/bp-core-avatars.php  
  1. function bp_core_check_avatar_size( $file ) { 
  2. if ( $file['file']['size'] > bp_core_avatar_original_max_filesize() ) 
  3. return false; 
  4.  
  5. return true;