Hooks and Filters
BuddyLists exposes filters on nearly every data function and a set of action hooks in its templates. Names below are taken from the plugin source.
Data filters
Section titled “Data filters”Each of these filters the return value of the matching function.
| Filter | Used for |
|---|---|
buddylists_list_count |
Total list count for a user. |
buddylists_list_insert |
Result of inserting a list. |
buddylists_insert_members |
Result of adding a member to a list. |
buddylists_delete_members |
Result of removing a member. |
buddylists_list_update |
Result of updating a list. |
buddylists_fetch_list_data_by_id |
List data fetched by ID. |
buddylists_fetch_member_data_by_list_id |
Members of a list. |
buddylists_fetch_member_count |
Member count for a list. |
buddylists_fetch_list_all_data |
Full list payload. |
buddylists_fetch_list_by_slug |
List looked up by slug. |
buddylists_fetch_list |
List lookup. |
buddylists_list_link |
Public URL of a list. |
buddylists_get_suggestions |
Suggested members for a user. |
buddylists_delete_list_data |
Result of deleting a list. |
buddylists_delete_all_members |
Result of clearing a list’s members. |
buddylists_get_paginated_lists |
Paginated lists for a user. |
buddylists_get_user_followers_count |
Follower count for a user. |
buddylists_get_user_following_count |
Following count for a user. |
Settings filters
Section titled “Settings filters”These filter the resolved settings arrays, letting you override any stored value at runtime.
buddylists_general_settingsbuddylists_visibility_settingsbuddylists_activity_settingsbuddylists_notification_settingsbuddylists_color_settingsbuddylists_editable_roles
Permission filters
Section titled “Permission filters”buddylists_create_list_permissionfilters whether the current user may create lists.buddylists_can_editfilters whether the current user may edit a given list.buddylists_is_relevant_activiesfilters whether list activity is relevant on the site.buddylists_is_friendsfilters the friend check used by edit permissions.
Notification filters
Section titled “Notification filters”buddylists_send_bp_notification_usertoggles the BuddyPress notification when a member is added or removed. Receives the action (“added” or “removed”) and the member ID.buddylists_send_email_notification_usertoggles the email notification. Defaults to false.buddylists_email_messagefilters the notification message text.
Template filter
Section titled “Template filter”buddylists_locate_templatefilters the resolved template path. See Template Overrides.
Action hooks
Section titled “Action hooks”Template action hooks you can attach to:
buddylist-user-info-popup(receives the user ID) inside the profile preview popup.buddylists_before_next_buttonandbuddylists_after_next_buttonin the list creation template.buddylist_before_single_list_banner,buddylist_single_list_banner,buddylist_after_single_list_bannerandbuddylist_after_direct_message_modalin the single list template.

