<?
// Fonction qui créer une base de données dans WordPress pour gérer l'envoi de token par mail
function hmns_create_tokens_table(): void {
    global $wpdb;

    $table   = $wpdb->prefix . 'hmns_magic_tokens';
    $charset = $wpdb->get_charset_collate();

    $sql = "CREATE TABLE IF NOT EXISTS {$table} (
        id          BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
        user_id     BIGINT UNSIGNED NOT NULL,
        token       VARCHAR(64)     NOT NULL,
        redirect    VARCHAR(512)    NOT NULL DEFAULT '/',
        remember_me TINYINT(1)      NOT NULL DEFAULT 0,
        expires_at  DATETIME        NOT NULL,
        PRIMARY KEY  (id),
        UNIQUE KEY   token (token),
        KEY          user_id (user_id),
        KEY          expires_at (expires_at)
    ) {$charset};";

    require_once ABSPATH . 'wp-admin/includes/upgrade.php';
    dbDelta($sql);
}
register_activation_hook(__FILE__, 'hmns_create_tokens_table');
add_action('plugins_loaded', 'hmns_create_tokens_table');<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="https://new.humanis.org/wp-sitemap-index.xsl" ?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><sitemap><loc>https://new.humanis.org/wp-sitemap-posts-post-1.xml</loc></sitemap><sitemap><loc>https://new.humanis.org/wp-sitemap-posts-page-1.xml</loc></sitemap><sitemap><loc>https://new.humanis.org/wp-sitemap-posts-give_forms-1.xml</loc></sitemap><sitemap><loc>https://new.humanis.org/wp-sitemap-posts-product-1.xml</loc></sitemap><sitemap><loc>https://new.humanis.org/wp-sitemap-posts-footer-1.xml</loc></sitemap><sitemap><loc>https://new.humanis.org/wp-sitemap-posts-gallery-1.xml</loc></sitemap><sitemap><loc>https://new.humanis.org/wp-sitemap-posts-gva_event-1.xml</loc></sitemap><sitemap><loc>https://new.humanis.org/wp-sitemap-posts-portfolio-1.xml</loc></sitemap><sitemap><loc>https://new.humanis.org/wp-sitemap-posts-gva_team-1.xml</loc></sitemap><sitemap><loc>https://new.humanis.org/wp-sitemap-taxonomies-category-1.xml</loc></sitemap><sitemap><loc>https://new.humanis.org/wp-sitemap-taxonomies-post_format-1.xml</loc></sitemap><sitemap><loc>https://new.humanis.org/wp-sitemap-taxonomies-give_forms_category-1.xml</loc></sitemap><sitemap><loc>https://new.humanis.org/wp-sitemap-taxonomies-product_brand-1.xml</loc></sitemap><sitemap><loc>https://new.humanis.org/wp-sitemap-taxonomies-product_cat-1.xml</loc></sitemap><sitemap><loc>https://new.humanis.org/wp-sitemap-taxonomies-product_tag-1.xml</loc></sitemap><sitemap><loc>https://new.humanis.org/wp-sitemap-taxonomies-gallery_cat-1.xml</loc></sitemap><sitemap><loc>https://new.humanis.org/wp-sitemap-taxonomies-gva_event_cat-1.xml</loc></sitemap><sitemap><loc>https://new.humanis.org/wp-sitemap-users-1.xml</loc></sitemap></sitemapindex>
