I don't think it can be done. I'm sorry, but this widget has no hooks in there. You can only use bp_has_members
hook, but you shouldn't use it to echo anything, because it's used in many other places, so you may break some things doing it this way.
The only way I can see to achieve this (and it's not perfect), is to write your own widget based on this BP widget. To do that you should:
- Find the original widget's source code. (It's in
bp-core/bp-core-widgets.php
file)
- Copy it's code and place it in your themes
function.php
- Rename it properly (take care of class name, and so on).
Register your new widget with:
add_action('widgets_init', create_function('', 'return register_widget("");') );
You can also try to inherit this new widget class from original BP widget class (you won't need to copy entire source code then).
bp_has_members
filter - it's called many times, not only in this widget.