Add link tag replacement support to form templates

[MAIPOET-3076]
This commit is contained in:
Rostislav Wolny
2020-09-10 10:23:18 +02:00
committed by Veljko V
parent b818e2755a
commit 8d08560760

View File

@@ -4,6 +4,7 @@ namespace MailPoet\Form\Templates;
use MailPoet\Entities\FormEntity;
use MailPoet\Util\CdnAssetUrl;
use MailPoet\Util\Helpers;
use MailPoet\WP\Functions as WPFunctions;
abstract class FormTemplate {
@@ -123,4 +124,8 @@ EOL;
protected function getAssetUrl(string $filename): string {
return $this->cdnAssetUrl->generateCdnUrl("form-templates/{$this->assetsDirectory}/$filename");
}
protected function replaceLinkTags($source, $link, $attributes = [], $linkTag = false): string {
return Helpers::replaceLinkTags($source, $link, $attributes, $linkTag);
}
}