I have a question regarding Buddypress plugin.

It seems that I can use Buddypress function such as bp_core_signup_user() without any declaration on other plugins.

How is it possible?

I’m newbie to WordPress so please help me to understand the basic concept.

Thank you 🙂

  • What do you mean “without any declaration on other plugins”? If BuddyPress is installed you can use it’s functions. Mar 12 '20 at 14:00
  • Thank you for your reply. I'm sorry I'm newbie to development. In case of using other function in files, I used class::function name, but in case of buddypress, I could use just function without any declaration and does not need include or require_once in my file. How could it possible? I wonder that reason :) Sincerely, Jen
    – hiyo
    Mar 13 '20 at 2:35
  • Because that BuddyPress function isn’t a class method, and BuddyPress loads it when the plugin is loaded. What you can do depends on how each plugin works. You will need to check each Plugin’s documentation and learn some basic PHP concepts to understand why. Both those areas are off topic for this forum, but there are plenty of resources available. Mar 13 '20 at 2:53
  • @JacobPeattie I see. Thank you for your reply. It helps a lot. Have a good day!!
    – hiyo
    Mar 13 '20 at 3:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.