From 85d45b6a3ab01e62f7dd7b58d9a56d5c3cbf3d63 Mon Sep 17 00:00:00 2001 From: Kurtis Holsapple Date: Wed, 7 May 2025 09:24:04 -0700 Subject: [PATCH] WIP --- .../rad-theme-engine/src/RadThemeEngine.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/vendor/open-function-computers-llc/rad-theme-engine/src/RadThemeEngine.php b/vendor/open-function-computers-llc/rad-theme-engine/src/RadThemeEngine.php index 1bb9a80..ff501c6 100644 --- a/vendor/open-function-computers-llc/rad-theme-engine/src/RadThemeEngine.php +++ b/vendor/open-function-computers-llc/rad-theme-engine/src/RadThemeEngine.php @@ -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:

".print_r($g, true); + continue; + } + + if (!isset($g["acf_fc_layout"])) { + $output .= "Sorry, one of your items is missing the `acf_fc_layout` key:

".print_r($g, true); + continue; + } + + $output .= site()->render($g["acf_fc_layout"], $g); } return $output; };