I was just reading through BuddyPress code because I want to develop a custom plugin on top of it. I encountered something very peculiar that I haven't seen before and cannot seem to find any material on.
The following code is from a protected function under a class named
// Filter BuddyPress template hierarchy and look for page templates. add_filter( 'bp_get_buddypress_template', array( $this, 'theme_compat_page_templates' ), 10, 1 );
As far as I know, the syntax for
add_filter is something like
add_filter ('hook_name', 'callback_function', $priority, $number_of_arguments)
How is it that an array has been passed instead of the callback function? How exactly would this line of code run?