Metro_Sitemap::setup PHP Method

setup() public static method

Register actions for our hook
public static setup ( )
    public static function setup()
    {
        define('MSM_INTERVAL_PER_GENERATION_EVENT', 60);
        // how far apart should full cron generation events be spaced
        add_filter('cron_schedules', array(__CLASS__, 'sitemap_15_min_cron_interval'));
        // A cron schedule for creating/updating sitemap posts based on updated content since the last run
        add_action('init', array(__CLASS__, 'sitemap_init'));
        add_action('admin_init', array(__CLASS__, 'sitemap_init_cron'));
        add_action('redirect_canonical', array(__CLASS__, 'disable_canonical_redirects_for_sitemap_xml'), 10, 2);
        add_action('init', array(__CLASS__, 'create_post_type'));
        add_filter('template_include', array(__CLASS__, 'load_sitemap_template'));
        // By default, we use wp-cron to help generate the full sitemap.
        // However, this will let us override it, if necessary, like on WP.com
        if (true === apply_filters('msm_sitemap_use_cron_builder', true)) {
            require dirname(__FILE__) . '/includes/msm-sitemap-builder-cron.php';
            MSM_Sitemap_Builder_Cron::setup();
        }
    }