Correct@rita you mean something like this triggers it: [RANDOM_CONTENT: 1|2|3|4|5] ?
$content = 'This is some random content "[RANDOM_CONTENT: 1|2|3|4|5]" and it should work just fine!';
echo CampaignHelper::applyRandomContentTag($content) . PHP_EOL;
cristi@Serbans-MacBook-Pro /tmp % php rnd.php
This is some random content "2" and it should work just fine!
cristi@Serbans-MacBook-Pro /tmp % php rnd.php
This is some random content "5" and it should work just fine!
cristi@Serbans-MacBook-Pro /tmp % php rnd.php
This is some random content "3" and it should work just fine!
$content = (string)str_replace($tag, $tagValue[$randKey], $content);
$content = (string)str_replace($tag, $tagValue[$randKey], (string) $content);
– /var/www/html/apps/common/components/utils/EmailTemplateTagFilter.php(59): str_replace()54 foreach ($registeredTags as $tagName => $tagValue) { 55 //if (empty($tagValue)) { 56 // continue; 57 //} 58 59 $tagName = (string)str_replace(['[', ']'], '', $tagName); 60 if (strpos($content, '[' . $tagName . ':filter:') === false) { 61 continue; 62 } 63 64 // do we really need preg_quote ? |
– /var/www/html/apps/common/components/helpers/CampaignHelper.php(49): EmailTemplateTagFilter->apply()44 $content = StringHelper::decodeSurroundingTags($content); 45 $content = HtmlHelper::fixDragAndDropBuilderMarkup($content); 46 47 $searchReplace = self::getCommonTagsSearchReplace($content, $campaign, $subscriber, $server); 48 $content = (string)str_replace(array_keys($searchReplace), array_values($searchReplace), $content); 49 $content = self::getTagFilter()->apply($content, $searchReplace); 50 51 $to = $searchReplace['[CAMPAIGN_TO_NAME]'] ?? ''; 52 $subject = $searchReplace['[CAMPAIGN_SUBJECT]'] ?? ''; 53 54 // tags with params, if any... |
– /var/www/html/apps/customer/controllers/CampaignsController.php(2059): CampaignHelper::parseContent()2054 if (!$onlyPlainText && CampaignHelper::hasCountdownTag($emailContent)) { 2055 $emailContent = CampaignHelper: 2056 } 2057 // 2058 2059 $emailData = CampaignHelper: 2060 [, $_emailSubject, $emailContent] = $emailData; 2061 2062 // since 1.3.5.3 2063 if (CampaignHelper::contentHasXmlFeed($_emailSubject)) { 2064 $_emailSubject = CampaignXmlFeedParser: |
$tagName = (string)str_replace(['[', ']'], '', $tagName);
$tagName = (string)str_replace(['[', ']'], '', (string) $tagName);