Skip to content

Commit

Permalink
Process data variables when calling WordPress do_shortcode function
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Oliver committed Apr 18, 2024
1 parent 8a0e4a4 commit d06308b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/brace.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}
Expand Down

0 comments on commit d06308b

Please sign in to comment.