I’ve been thinking of doing this.
Will investigate and report back.
[EDIT]
Here’s one way of doing what you want to do.
I’ve made it so that the main WP theme will not load the core BP CSS/JS files.
But on BP pages, it will load them.
Enter this only on your WP theme’s functions.php:
function remove_bp_cssjs() {
remove_action('wp', 'bp_core_add_js');
}
add_action('init', 'remove_bp_cssjs');
Caveats with this approach is you’ll need to load the bp_core_add_js() function again manually if you use any BP widget on any WP post or page.
A way to do this is to manually add the BP CSS styles to your main WP theme’s stylesheet, while using Justin Tadlock’s Javascript Logic plugin to load the BP javascripts on a conditional basis. I’ll let you figure that one out
—
I’m also looking at trimming more of the BP fat by removing the widget CSS files that are left over as well.
Stay tuned…
Hmm… not sure how to remove the widget JS/CSS that use wp_enqueue_script and wp_enqueue_style.
If anyone has any pointers for this without hacking the core, let me know.
—
Also, I’d just like to say to the BP devs that instead of separating each CSS/JS file into separate components, why not load all BP javascripts in one file?
Same goes for the widget CSS files. (I understand the BP CSS is a little too much to jam into one file… with all the different structure.css files!)
This would help reduce the number of server requests and also keep the HTML source a little bit leaner.
Just a thought.