Filter Autocomplete IDs?
-
I am trying to filter autocomplete IDs in Message to just a certain role or member type based on the user’s role or member type. Sometimes they are not friends so I tried setting BP_MESSAGES_AUTOCOMPLETE_ALL and it works great to get everyone but I can’t find how to filter it. I’m trying this just to see what I have to work with but it doesn’t seem to fire:
define('BP_MESSAGES_AUTOCOMPLETE_ALL', 1);
add_filter('bp_friends_autocomplete_ids', 'my_autocomplete', 10, 3);
function my_autocomplete($data, $string, $limit) {
print_r($data);
print_r($string);
print_r($limit);
}
Any ideas?
- You must be logged in to reply to this topic.