apply_filters( 'bp_attachments_avatar_nav', array $avatar_nav, string $object )

Use this filter to add a navigation to a custom tool to set the object’s avatar.

Description

Parameters

$avatar_nav

An associative array of available nav items where each item is an array organized this way: $avatar_nav[ $nav_item_id ].

  • 'nav_item_id'
    (string) The nav item id in lower case without special characters or space.
  • 'caption'
    (string) The name of the item nav that will be displayed in the nav.
  • 'order'
    (int) An integer to specify the priority of the item nav, choose one. between 1 and 99 to be after the uploader nav item and before the delete nav item.
  • 'hide'
    (int) If set to 1 the item nav will be hidden (only used for the delete nav item).

$object

The object the avatar belongs to (eg: user or group).

Source

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

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.