Skip to content

Commit

Permalink
{iftheme} tag now works even at beginning of string.
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-milette committed May 2, 2024
1 parent 20646e4 commit 2579553
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -4598,7 +4598,7 @@ function ($matches) use ($mycohorts) {
// Description: Display content only if the current theme matches the one specified.
// Parameters: The name of the directory in which the theme is located.
// Requires content between tags.
if (stripos($text, '{iftheme ') != false) {
if (stripos($text, '{/iftheme') !== false) {
$theme = strtolower($PAGE->theme->name);
$re = '/{iftheme\s+(.*)\}(.*)\{\/iftheme\}/isuU';
$found = preg_match_all($re, $text, $matches);
Expand Down

0 comments on commit 2579553

Please sign in to comment.