apply_filters( 'bp_core_pre_delete_existing_avatar', bool $value, array $args )

Filters whether or not to handle deleting an existing avatar.

Description

If you want to override this function, make sure you return false.

Parameters

$value

Whether or not to delete the avatar.

$args

Array of function parameters.

  • 'item_id'
    (bool|int) ID of the item whose avatar you're deleting. Defaults to the current item of type $object.
  • 'object'
    (string) Object type of the item whose avatar you're deleting. 'user', 'group', 'blog', or custom. Default: 'user'.
  • 'avatar_dir'
    (bool|string) Subdirectory where avatar is located. Default: false, which falls back on the default location corresponding to the $object.

Source

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

Changelog

Changelog
Version Description
BuddyPress 2.5.1 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.