Extending HappenBoard with hooks

HappenBoard exposes actions and filters at the points where you are most likely to want to change something: the sign-up form, the emails, the event schema, the booking slots, the migration adapters. This page covers what you need before using any of them.

Where your code goes

Put your callbacks in a small plugin of your own, or in the functions.php of a child theme. Never edit the HappenBoard files directly: your changes would be lost at the next update.

Hook on happenboard_loaded, not plugins_loaded

HappenBoard fires happenboard_loaded once its own services are wired. Registering from there means the plugin’s classes are safe to touch. HappenBoard Pro itself boots from this hook.

add_action(
    'happenboard_loaded',
    function (): void {
        // HappenBoard's own services are wired by now, so its classes
        // are safe to touch from here.
        add_filter( 'happenboard_rsvp_form_fields', 'my_plugin_extra_fields', 10, 2 );
    }
);

How the hooks are named

Everything is prefixed happenboard_. Hooks added by HappenBoard Pro use happenboard_pro_, with two exceptions kept for historical reasons: the MailerPress triggers are named happenboard_mp_, and a few Pro hooks extend a Free one and keep the Free name.

Filters expect you to return a value of the same type you were given. Actions return nothing. If a hook passes more than one argument, you must declare how many you accept as the fourth parameter of add_filter() or add_action(), otherwise your callback only ever receives the first.

Finding the right hook

The reference is split by subject. Each page opens with a table of the hooks it covers, and every entry carries its signature, its parameters, a runnable example and the traps worth knowing. The index lists all of them alphabetically.