function nmx_outstanding_publish() {
  $base = WP_CONTENT_DIR . '/novamira-sandbox/nmx-outstanding/';
  $style = @file_get_contents($base . 'style.html');
  $hero_en = @file_get_contents($base . 'hero-en.html');
  $hero_fil = @file_get_contents($base . 'hero-fil.html');
  if (!$style || !$hero_en || !$hero_fil) {
    return array('ok' => false, 'error' => 'missing_fragments', 'base' => $base);
  }
  $uploads = wp_upload_dir();
  $basedir = $uploads['basedir'];
  $ts = gmdate('Ymd-His');
  $results = array();
  foreach (array(6 => $hero_en, 778 => $hero_fil) as $id => $hero) {
    $post = get_post($id);
    if (!$post) {
      $results[$id] = array('ok' => false, 'error' => 'missing_post');
      continue;
    }
    $content = $post->post_content;
    $backup = $basedir . '/nm-home-' . ($id === 6 ? 'en' : 'fil') . '-backup-outstanding-' . $ts . '.html';
    file_put_contents($backup, $content);
    $new_content = preg_replace(
      '/<!-- wp:html -->\s*<style id="nmx-(?:exact-clone|elevated|outstanding)">.*?<\/style>\s*<!-- \/wp:html -->/s',
      '<!-- wp:html -->' . "\n" . $style . "\n" . '<!-- /wp:html -->',
      $content,
      1,
      $count_style
    );
    if (!$count_style) {
      $results[$id] = array('ok' => false, 'error' => 'style_not_found', 'backup' => $backup);
      continue;
    }
    $new_content = preg_replace(
      '/<!-- wp:html -->\s*<div class="nmx-root">.*?<\/div>\s*<!-- \/wp:html -->/s',
      '<!-- wp:html -->' . "\n" . $hero . "\n" . '<!-- /wp:html -->',
      $new_content,
      1,
      $count_hero
    );
    if (!$count_hero) {
      $results[$id] = array('ok' => false, 'error' => 'hero_not_found', 'backup' => $backup, 'style_replaced' => $count_style);
      continue;
    }
    if (strpos($new_content, 'nmx-util') !== false) {
      $results[$id] = array('ok' => false, 'error' => 'util_bar_detected', 'backup' => $backup);
      continue;
    }
    $updated = wp_update_post(array(
      'ID' => $id,
      'post_content' => $new_content,
    ), true);
    if (is_wp_error($updated)) {
      $results[$id] = array('ok' => false, 'error' => $updated->get_error_message(), 'backup' => $backup);
      continue;
    }
    clean_post_cache($id);
    $results[$id] = array(
      'ok' => true,
      'backup' => $backup,
      'old_len' => strlen($content),
      'new_len' => strlen($new_content),
      'has_outstanding' => (strpos($new_content, 'nmx-outstanding') !== false),
      'has_hero' => (strpos($new_content, 'nmx-ip-art') !== false),
      'has_answer' => (strpos($new_content, 'id="homepage-answer"') !== false),
      'has_util' => (strpos($new_content, 'nmx-util') !== false),
    );
  }
  $purge = array('litespeed' => false);
  if (class_exists('LiteSpeed\Purge')) {
    try {
      \LiteSpeed\Purge::purge_all();
      $purge['litespeed'] = true;
    } catch (Exception $e) {
      $purge['error'] = $e->getMessage();
    }
  } elseif (has_action('litespeed_purge_all')) {
    do_action('litespeed_purge_all');
    $purge['litespeed'] = 'action';
  }
  return array('ok' => true, 'results' => $results, 'purge' => $purge, 'ts' => $ts);
}
<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="//10001ip.co/main-sitemap.xsl"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
	<sitemap>
		<loc>https://10001ip.co/page-sitemap.xml</loc>
		<lastmod>2026-10-11T19:51:05+00:00</lastmod>
	</sitemap>
</sitemapindex>
<!-- XML Sitemap generated by Rank Math SEO Plugin (c) Rank Math - rankmath.com -->