Post Warmup


The function placid_warmup_post allows for the automated pre-loading of your posts.
This function triggers the generation of images for OpenGraph, Twitter, and Pinterest associated with the post.

By configuring the Image Generation setting of the plugin to "Synchronous", the function will execute continuously until the image generation process is completed.
Please note that the maximum time allocated for each image generation is 30 seconds.

function placid_init_callback() {

    // - $post_id: This is the ID of the post you wish to warm up
    // - $purge_existing_images: A boolean value (true/false). If set to true, all existing images will be removed before the warmup process begins

    placid_warmup_post($post_id, $purge_existing_images);
}

// - You should call the closures in an init callback
add_action( 'init', 'placid_init_callback' );