bp_disable_group_avatar_uploads( bool|null $default = null )

Are group avatars disabled?

Description

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

Parameters

$default

(bool|null) (Optional) Fallback value if not found in the database. Defaults to the value of bp_disable_avatar_uploads().

Default value: null

Return

(bool) True if group avatar uploads are disabled, otherwise false.

Source

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

function bp_disable_group_avatar_uploads( $default = null ) {
	$disabled = bp_get_option( 'bp-disable-group-avatar-uploads', '' );

	if ( '' === $disabled ) {
		if ( is_null( $default ) ) {
			$disabled = bp_disable_avatar_uploads();
		} else {
			$disabled = $default;
		}
	}

	/**
	 * Filters whether or not members are able to upload group avatars.
	 *
	 * @since BuddyPress 2.3.0
	 *
	 * @param bool $disabled Whether or not members are able to upload their groups avatars.
	 * @param bool $default  Default value passed to the function.
	 */
	return (bool) apply_filters( 'bp_disable_group_avatar_uploads', $disabled, $default );
}

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.