Updated other extensions
This commit is contained in:
parent
4174948cc5
commit
1f60136bf3
11 changed files with 28 additions and 23 deletions
|
@ -13,13 +13,14 @@ class SpeakerDeckExtension extends Twig_Extension
|
|||
public function getFunctions()
|
||||
{
|
||||
return [
|
||||
new Twig_SimpleFunction('speakerdeck', [$this, 'embedCode']),
|
||||
new Twig_SimpleFunction('speakerdeck', [$this, 'embedCode'], [
|
||||
'is_safe' => ['html']
|
||||
]),
|
||||
];
|
||||
}
|
||||
|
||||
public function embedCode($dataId, $dataRatio)
|
||||
{
|
||||
// <script async class="speakerdeck-embed" data-id="0041804e52664d12a8e31cd118264813" data-ratio="1.77777777777778" src="//speakerdeck.com/assets/embed.js"></script>
|
||||
return sprintf(
|
||||
'<script async class="speakerdeck-embed" data-id="%s" data-ratio="%s" src="//speakerdeck.com/assets/embed.js"></script>',
|
||||
$dataId,
|
||||
|
|
|
@ -13,7 +13,9 @@ class TweetExtension extends Twig_Extension
|
|||
public function getFunctions()
|
||||
{
|
||||
return [
|
||||
new Twig_SimpleFunction('tweet', [$this, 'render']),
|
||||
new Twig_SimpleFunction('tweet', [$this, 'render'], [
|
||||
'is_safe' => ['html']
|
||||
]),
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,9 @@ class VimeoExtension extends Twig_Extension
|
|||
public function getFunctions()
|
||||
{
|
||||
return [
|
||||
new Twig_SimpleFunction('vimeo', [$this, 'embedCode'])
|
||||
new Twig_SimpleFunction('vimeo', [$this, 'embedCode'], [
|
||||
'is_safe' => ['html']
|
||||
])
|
||||
];
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue