Re: Please help – understanding Buddypress code without documentation
@bgrun80 I’ve added you as an Editor on the codex. (The script that is supposed to handle this setup automatically has been acting buggy lately.)
When you load a URL that matches a pattern that BP is looking for (eg /members/boonebgorges), BP first finds the corresponding data in the database (in this example, the profile data for a member matching the name ‘boonebgorges’) and then loads the theme file designated for this kind of data (members/single/home). In broad strokes, it’s not that different from how a standard WP post query works.
The relationship between core files is conventional. For something like the groups component:
– bp-groups/bp-groups-templatetags.php contains all function that are called from theme templates, along with the loop builder classes
– bp-groups/bp-groups-filters.php contains the functions that modify the output of the groups component via apply_filters(), plus the application of any WP-native filters like kses
– bp-groups/bp-groups-classes.php contains the database classes (for the most part, the -classes.php files should be the only place where SQL statements appear) as well as any other miscellaneous classes (like the BP_Group_Extension class, in the case of groups)
– bp-groups/bp-groups-notifications.php contains the functions that format and send email notifications related to the group
– bp-groups.php contains some setup functions for the component (like groups_setup_globals() and the functions that set up navigation), as well as any other functions that don’t have a natural home in any of the other files listed above.