HEX
Server: Apache/2.4.66 (Debian)
System: Linux 6dfabc3b2241 6.8.0-71-generic #71-Ubuntu SMP PREEMPT_DYNAMIC Tue Jul 22 16:52:38 UTC 2025 x86_64
User: (1000)
PHP: 8.3.30
Disabled: NONE
Upload Files
File: //proc/thread-self/root/tmp/fix-support-cae-hero.php
<?php
/**
 * Fix Support CAE page hero — replace MVV placeholder with correct Figma content.
 */

$page_id = 25;
$post = get_post($page_id);
$content = $post->post_content;

// Replace the hero block with correct Support CAE content from Figma
$old_hero = '/<!-- wp:acf\/hero \{[^}]*\} \/-->/';
$new_hero = '<!-- wp:acf/hero {"name":"acf/hero","data":{"hero_heading":"SUPPORT CAE","_hero_heading":"field_hero_heading","hero_description":"The future we imagine can only exist if we build it together. As a community-based nonprofit, we rely on your voice and your donation to keep our programs running year after year.","_hero_description":"field_hero_description"},"mode":"preview"} /-->';

$new_content = preg_replace($old_hero, $new_hero, $content, 1);

if ($new_content === $content) {
    WP_CLI::error("Could not find hero block to replace");
}

wp_update_post([
    'ID' => $page_id,
    'post_content' => $new_content,
]);

WP_CLI::success("Updated hero on page $page_id: heading='SUPPORT CAE', description from Figma node 19268:619467");