We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9c41d2e commit 9325c3cCopy full SHA for 9325c3c
src/CookiesManager.php
@@ -276,4 +276,22 @@ public function renderInfo(): string
276
'cookies' => $this->registrar,
277
])->render();
278
}
279
+
280
+ public function replaceInfoTag(string $wysiwyg): string
281
+ {
282
+ $cookieConsentInfo = view('cookie-consent::info', [
283
+ 'cookies' => $this->registrar,
284
+ ])->render();
285
286
+ $formattedString = preg_replace(
287
+ [
288
+ '/\<(\w)[^\>]+\>\@cookieconsentinfo\<\/\1\>/',
289
+ '/\@cookieconsentinfo/',
290
+ ],
291
+ $cookieConsentInfo,
292
+ $wysiwyg,
293
+ );
294
295
+ return $formattedString;
296
+ }
297
0 commit comments