Which Hook Fires After Entire WordPress Site Has Finished Loading?

Assuming you’re using a plugin like Gravity Forms to manage your content, your site’s loading process depends on the plugin. Gravity Forms hooks into the wp_loaded() function to determine when the entire site has finished loading.

If your Gravity Forms plugin is loaded after the wp_loaded() function has already been called, it will trigger the Gravity Forms plugin’s after_load() function instead.

The after_load() function is responsible for performing any necessary processing after the site has finished loading, like clearing Gravity Forms data. If your Gravity Forms plugin is loaded after the wp_loaded() function has already been called, it will trigger the Gravity Forms plugin’s after_initialize() function instead.

So, to summarize:

If your Gravity Forms plugin is loaded after the wp_loaded() function has already been called, it will trigger the Gravity Forms plugin’s after_load() function.

If your Gravity Forms plugin is loaded after the wp_loaded() function has already been called, it will trigger the Gravity Forms plugin’s after_initialize() function.