From d06308b78572f0ec4b2a59eaed173f1e2f33055a Mon Sep 17 00:00:00 2001 From: Alex Oliver Date: Thu, 18 Apr 2024 08:52:06 +0100 Subject: [PATCH] Process data variables when calling WordPress do_shortcode function --- src/brace.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/brace.php b/src/brace.php index 9a047f9..9f40105 100644 --- a/src/brace.php +++ b/src/brace.php @@ -314,7 +314,7 @@ private function processLine(string $this_line, array $dataset, bool $render): v if (preg_match_all('/\[(.*?)\]/', $this_line, $matches, PREG_SET_ORDER)) { foreach ($matches as $theShortcode) { $this_line = (function_exists('do_shortcode') - ? str_replace($theShortcode[0], do_shortcode($theShortcode[0]), $this_line) + ? str_replace($theShortcode[0], do_shortcode($this->processVariables($theShortcode[0], $dataset)), $this_line) : str_replace($theShortcode[0], $this->callShortcode($theShortcode[0], $dataset), $this_line)); } }