groundhogg/loaded

📅 Published on

📝 Last updated

Documentation

»

Action Hooks

»

groundhogg/loaded

Fires after Groundhogg has fully loaded and instantiated all of its components — the earliest safe point to interact with Groundhogg classes and functions.

do_action( 'groundhogg/loaded' );

This hook has no arguments.

Example

add_action( 'groundhogg/loaded', 'my_extension_init' );

/**
 * Initialise the extension once Groundhogg is ready.
 *
 * @return void
 */
function my_extension_init() {
    \Groundhogg\Plugin::instance()->replacements->add(
        'my_custom_tag',
        'My Extension',
        'Custom Value',
        'my_extension_replacement_callback',
        'Returns a custom value for the contact.'
    );
}

Was this helpful?

Let us know if this document answered your question. That’s the only way we can improve.