<?php

/**

 * Plugin Name: Cache Me Baby

 * Plugin URI: https://www.wpfixit.com/

 * Description: Simulates visiting all published pages, posts, and custom post types to warm up cache.

 * Version: 3.3

 * Author: WP Fix It

 * Author URI: https://www.wpfixit.com/

 * License: GPL2

 * Text Domain: cache-me-baby

 */



if (!defined('ABSPATH')) exit;



define('CACHE_ME_BABY_PATH', plugin_dir_path(__FILE__));



// Require must have files

include_once CACHE_ME_BABY_PATH . 'includes/main.php';



// Load up the class

CacheMeBaby::get_instance();



// Plugin Activation Functions

register_activation_hook(__FILE__, function() {

    $default_post_types = ['post', 'page'];

    if (false === get_option('cache_me_baby_post_types'))

        update_option('cache_me_baby_post_types', $default_post_types);

    if (false === get_option('cache_me_baby_cron_schedule'))

        update_option('cache_me_baby_cron_schedule', 'none');

    if (false === get_option('cache_me_baby_auto_cache_update'))

        update_option('cache_me_baby_auto_cache_update', '1');

});