Implements the wordpress hook functionality for any application.