Info about the used action \"wp\"
-
Hi,
I just looked through some of BP’s well structured source code, just to get an idea on how it works.
There was one thing that I noticed and that is pretty new to me, so it would be really cool, if someone (probably one of the developers) has some information for me about this:
BuddyPress uses the action “wp” quite often, e.g. it hooks functions to it like this:
add_action( 'wp', 'some_function' );
I haven’t found the corresponding “do_action( ‘wp’, … );” in BP, so I grep’d through the WP source and found it in the WP class there.
I’m familiar a little bit with WP plugin development and have so far not seen the action used there.
Thus my question: Why does BP use this action (and not e.g. “init” or “plugins_loaded”)? What are the advantages? What are the use cases for which this brings advantages?
Thanks!
Tobias
- The topic ‘Info about the used action \"wp\"’ is closed to new replies.