<?phpif (!defined('ABSPATH')) exit;/* ================================REMOVE BATCH RUN================================ */function mah2_ajax_run_remove_batch() {    check_ajax_referer('mah2_batch_nonce', 'nonce');    if (!current_user_can('manage_options')) {        wp_send_json_error(['message' => 'Accès refusé']);    }    $settings = mah2_get_settings();    $batch_size = isset($settings['batch_size']) ? intval($settings['batch_size']) : 10;    $state = mah2_get_batch_state('remove');    if (empty($state) || !empty($state['done'])) {        wp_send_json_success([            'done' => true,            'message' => 'Aucun batch actif.',            'progress' => 100,            'stats' => [                'posts_processed' => 0,                'posts_updated' => 0,                'total' => 0,            ],            'debug' => [],        ]);    }    if (!empty($state['stopped'])) {        wp_send_json_success([            'done' => true,            'stopped' => true,            'message' => 'Suppression arrêtée.',            'progress' => 0,            'stats' => [                'posts_processed' => intval($state['posts_processed']),                'posts_updated' => intval($state['posts_updated']),                'total' => intval($state['total']),            ],            'debug' => !empty($state['debug']) ? $state['debug'] : [],        ]);    }    $offset = isset($state['offset']) ? intval($state['offset']) : 0;    $total  = isset($state['total']) ? intval($state['total']) : 0;    $ids    = isset($state['ids']) ? (array) $state['ids'] : [];    $batch_ids = array_slice($ids, $offset, $batch_size);    $debug_messages = [];    foreach ($batch_ids as $post_id) {        $post_id = intval($post_id);        $before = get_post_field('post_content', $post_id);        if (!$before) {            $state['posts_processed']++;            continue;        }        mah2_remove_links_for_post($post_id);        $after = get_post_field('post_content', $post_id);        $updated = ($before !== $after);        $state['posts_processed']++;        if ($updated) {            $state['posts_updated']++;        }        if (mah2_debug_enabled()) {            $debug_messages[] = "Post {$post_id} cleaned: " . ($updated ? 'YES' : 'NO');        }    }    $state['offset'] += count($batch_ids);    if ($state['offset'] >= $total || empty($batch_ids)) {        $state['done'] = true;    }    if (mah2_debug_enabled()) {        $existing_debug = isset($state['debug']) ? $state['debug'] : [];        $state['debug'] = array_slice(            array_merge($existing_debug, $debug_messages),            -200        );    }    mah2_save_batch_state($state, 'remove');    $progress = $total > 0        ? round(($state['offset'] / $total) * 100)        : 100;    if ($progress > 100) $progress = 100;    wp_send_json_success([        'done' => !empty($state['done']),        'progress' => $progress,        'message' => !empty($state['done'])            ? 'Suppression terminée.'            : 'Batch suppression traité.',        'stats' => [            'posts_processed' => intval($state['posts_processed']),            'posts_updated' => intval($state['posts_updated']),            'total' => $total,        ],        'debug' => !empty($state['debug']) ? $state['debug'] : [],    ]);}add_action('wp_ajax_mah2_run_remove_batch', 'mah2_ajax_run_remove_batch');<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="//www.objectif-reponse-sante-limousin.fr/wp-content/plugins/wordpress-seo/css/main-sitemap.xsl"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
	<sitemap>
		<loc>https://www.objectif-reponse-sante-limousin.fr/post-sitemap.xml</loc>
		<lastmod>2026-04-03T15:14:08+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://www.objectif-reponse-sante-limousin.fr/post-sitemap2.xml</loc>
		<lastmod>2026-04-03T15:14:08+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://www.objectif-reponse-sante-limousin.fr/page-sitemap.xml</loc>
		<lastmod>2025-10-04T01:39:06+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://www.objectif-reponse-sante-limousin.fr/category-sitemap.xml</loc>
		<lastmod>2026-04-03T15:14:08+00:00</lastmod>
	</sitemap>
</sitemapindex>
<!-- XML Sitemap generated by Yoast SEO -->