bp_disable_group_avatar_uploads

Are group avatars disabled?.

Description

bp_disable_group_avatar_uploads( (null) $default = null ); 

For backward compatibility, this option falls back on the value of bp-disable-avatar-uploads when no value is found in the database.

Parameters (1)

0. $default — Optional. (null) => null
Fallback value if not found in the database. Defaults to the value of bp_disable_avatar_uploads()..

Usage

  1. if ( !function_exists( 'bp_disable_group_avatar_uploads' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-core/bp-core-options.php'; 
  3.  
  4. // Optional. Fallback value if not found in the database. 
  5. // Defaults to the value of `bp_disable_avatar_uploads()`. 
  6. $default = null; 
  7.  
  8. // NOTICE! Understand what this does before running. 
  9. $result = bp_disable_group_avatar_uploads($default); 
  10.  

Defined (1)

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

/bp-core/bp-core-options.php  
  1. function bp_disable_group_avatar_uploads( $default = null ) { 
  2. $disabled = bp_get_option( 'bp-disable-group-avatar-uploads', '' ); 
  3.  
  4. if ( '' === $disabled ) { 
  5. if ( is_null( $default ) ) { 
  6. $disabled = bp_disable_avatar_uploads(); 
  7. } else { 
  8. $disabled = $default; 
  9.  
  10. /** 
  11. * Filters whether or not members are able to upload group avatars. 
  12. * @since 2.3.0 
  13. * @param bool $disabled Whether or not members are able to upload their groups avatars. 
  14. * @param bool $default Default value passed to the function. 
  15. */ 
  16. return (bool) apply_filters( 'bp_disable_group_avatar_uploads', $disabled, $default );