Re: Please help – understanding Buddypress code without documentation
Cheers @boonebgorges.
So, if I can clarify the whole process. Please tell me if I’m right or if I’m wrong,
and I’ll post it up on my forum, and make a page in the codex if you want.
When a visitor loads the URL of a Buddypress-supported site:
1. the WordPress environment loads and loads the Buddypress plugin
2. buddypress/bp-themes/bp-default is loaded (if you have activated that theme)
3. as the visitor browses through different pages, functions are activated in those pages
4. these functions draw their code from the core files (checking first if bp-custom.php contains same-named functions that will overwrite code in the core files)
5. there are 9 core files
6. these 9 core files require/include other groups of code from folders that are named the same way
e.g. ‘bp-core.php’ requires/includes the files from the ‘bp-core’ folder
7. The files in these folders are groups of code that share a similar category (e.g. classes) (e.g. bp-core/bp-core-classes.php)
because modularizing them this way makes it easier to find the code you need.
8. extra code that is hard to categorize clearly is simply put into the main file (e.g. bp-core.php)
Questions:
a. Is the above list right?
b. Do the core files need to be loaded every time a user visits a page and activates a related function?
e.g. if a user activates a function related to friends, does bp-friends.php need to be loaded?