apply_filters( 'bp_legacy_object_template_path' )
AJAX requests happen too early to be seen by bp_update_is_directory() so we do it manually here to ensure templates load with the correct context. Without this check, templates will load the ‘single’ version of themselves rather than the directory version.