This commit is contained in:
2025-05-07 09:24:04 -07:00
parent 83f08fc2c5
commit 85d45b6a3a

View File

@@ -62,7 +62,17 @@ class RadThemeEngine
$groups = $context->get($args);
foreach ($groups as $g) {
$output .= site()->render($g["tpl"], $g);
if (!is_array($g)) {
$output .= "Sorry, one of your items is not compatible with the flex helper. Here is the details:<br /><br />".print_r($g, true);
continue;
}
if (!isset($g["acf_fc_layout"])) {
$output .= "Sorry, one of your items is missing the `acf_fc_layout` key:<br /><br />".print_r($g, true);
continue;
}
$output .= site()->render($g["acf_fc_layout"], $g);
}
return $output;
};