Skip to content

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.

Each of these filters the return value of the matching function.

Filter Used for
buddylists_list_count Total list count for a user.
buddylists_widget_member_ceiling How many members the sidebar widgets consider on one list. Default 500; the newest memberships win when it bites. Receives the list ID.
buddylists_active_member_window_days How many days back the Active Members widget counts a member as active. Default 30. Receives the list ID.
buddylists_activity_member_ceiling Caps how many people a list’s activity feed draws from. Default 0, meaning everyone on the list. Receives the list ID.
buddylists_people_per_page People shown per page on the Members and Followers views. Default 20.
buddylists_image_max_bytes Largest cover or icon in bytes. Default 5 MB, and never above the server’s upload limit.
buddylists_reserved_slugs Addresses refused for the Web address setting. Receives the list built from your site’s own pages and bases.
buddylists_get_followers_count Follower count for a list.
buddylists_next_button_behavior Options for the create and edit window’s save button. Only create_list_on_next, validation_required and redirect_on_error are read.
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.

These filter the resolved settings arrays, letting you override any stored value at runtime.

  • buddylists_general_settings
  • buddylists_visibility_settings
  • buddylists_activity_settings (the two options now stored with the Visibility settings)
  • buddylists_notification_settings
  • buddylists_color_settings
  • buddylists_admin_tabs adds, removes or reorders the sidebar screens on the admin page.
  • buddylists_editable_roles
  • buddylists_create_list_permission filters whether the current user may create lists.
  • buddylists_can_edit filters whether the current user may edit a given list. Kept for themes that hook it. The server decides with buddylists_user_can_manage_list().
  • buddylists_user_can_manage_list filters whether a user may manage a list. Receives the result, the list ID and the user ID. The AJAX endpoints and templates both use it.
  • buddylists_is_relevant_activies filters whether list activity is relevant on the site.
  • buddylists_is_friends filters the result of the buddylists_is_friends() helper. BuddyLists itself no longer calls that helper, so the filter only affects your own code that does.
  • buddylists_send_bp_notification_user toggles the BuddyPress notification when a member is added or removed. The value it receives follows the Added to a list or Removed from a list setting. The other arguments are the action (“added” or “removed”) and the member ID.
  • buddylists_send_email_notification_user toggles the email notification. The value it receives follows the Email members setting, which is off by default.
  • buddylists_email_message filters the email message text. Receives the message, the list, the action and the member ID.
  • buddylists_locate_template filters the resolved template path. See Template Overrides.

Lifecycle actions:

Action Arguments
buddylists_list_created List ID, owner user ID.
buddylists_list_updated List ID, user ID.
buddylists_list_deleted List ID.
buddylists_member_added List ID, member ID.
buddylists_member_removed List ID, member ID.

Template actions you can attach to:

  • buddylists_before_next_button and buddylists_after_next_button around the Create list button in the create and edit window.
  • buddylists_after_visibility_field after the Make Private field in that window.
  • buddylist_before_single_list_banner, buddylist_single_list_banner and buddylist_after_single_list_banner in the single list template.
  • buddylists_after_follow_button (receives the list ID) after the Follow List button.
  • buddylist_after_direct_message_modal in the single list template. The message window it was named after no longer exists, so the action fires with nothing before it.
  • buddylist-user-info-popup is gone. The hover preview over member names was removed, and nothing fires this action any more.