Anybody?
I did a search in the BuddyPress folder, and I can’t see any mention of a plugins.php file except for within bbpress, which I think refers to the plugins.php file within that.
Can any of the devs of the new theme explain exactly what purpose these plugins.php files serve? From I can see, there’s no purpose….
That’s a feature which has been around since BP 1.0. Currently, it is used for the “Settings” page. Have a look at bp_core_screen_general_settings() in bp-core-settings.php.
I’ve just come across a nicely written summary in the example component. For your reference:
/****
* OPTION 2 (NOT USED FOR THIS SCREEN):
* If your component is simple, and you just want to insert some HTML into the user’s active theme
* then you can use the bundle plugin template.
*
* There are two actions you need to hook into. One for the title, and one for the content.
* The functions you hook these into should simply output the content you want to display on the
* page.
*
* The follow lines are commented out because we are not using this method for this screen.
* You’d want to remove the OPTION 1 parts above and uncomment these lines if you want to use
* this option instead.
*/
// add_action( ‘bp_template_title’, ‘dpa_screen_one_title’ );
// add_action( ‘bp_template_content’, ‘dpa_screen_one_content’ );
// bp_core_load_template( apply_filters( ‘bp_core_template_plugin’, ‘members/single/plugins’ ) );
Thanks DJPaul.
That explains it perfectly. No wonder my search missed it, I was looking for mention of plugins.php!
For anyone wondering what uses plugins.php files, the accounts settings page is one of those, which uses the members/single/plugins.php file.