diff --git a/src/bp-core/classes/class-bp-attachment-avatar.php b/src/bp-core/classes/class-bp-attachment-avatar.php
index 2887f33e2..83469dba4 100644
a
|
b
|
class BP_Attachment_Avatar extends BP_Attachment { |
257 | 257 | * Check that the new avatar doesn't have the same name as the |
258 | 258 | * old one before moving the previous one into history. |
259 | 259 | */ |
260 | | if ( ! empty( $existing_avatar ) && $existing_avatar !== $this->url . $relative_path ) { |
| 260 | if ( apply_filters( 'bp_enable_avatar_revision', true, $args['object'], $args['item_id'] ) && ! empty( $existing_avatar ) && $existing_avatar !== $this->url . $relative_path ) { |
261 | 261 | // Add a new revision for the existing avatar. |
262 | 262 | $avatars = bp_attachments_list_directory_files( $avatar_folder_dir ); |
263 | 263 | |