Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: Creating New Plugins

@hnla

Participant

But you haven’t really run a check to see if bp is loaded, at least not in the loader file which is why I think you have that response ( although the response does direct you to our codex entry showing the approach you have followed, so that doesn’t really make sense it smacks of an automated response or worse someone just zapping off the message without thinking? ), you simply require your main file without any checks then do a add_action on bp_include, in your main file you do use that function I’ve seen before to try and require the bp-loader and if not post a message which is fine it works but I wonder whether it’s better to move all your checks to your main loader file?

I have to admit I’ve always puzzled the best approach, rather annoyingly you can check half a dozen of the better BP developers and they all do something different, I would favour a consensus as to the best approach and have that written up as a best practice to follow in the codex – personally I’ve tried a variety of approaches all work, on my one wp repo plugin I used same loader.php approach you have requiring and add_actioning on bp_include hook.

Also originally the check was not so much to prevent ones plugin from loading but to prevent white screens if BP was deactivated with your plugin still running.

Skip to toolbar