Source of file VideoExtras.php
Size: 0,720 Bytes - Last Modified: 2021-12-24T07:10:36+00:00
/var/www/docs.ssmods.com/process/src/src/View/ShortCodes/VideoExtras.php
12345678910111213141516171819202122 | <?php namespace Sunnysideup\VideoEmbedExtras\View\ShortCodes; use SilverStripe\View\Shortcodes\EmbedShortcodeProvider; class VideoExtras extends EmbedShortcodeProvider { // public static function embedForTemplate($embed, $arguments) { // return parent::embedForTemplate($embed, $arguments); // } public static function handle_shortcode($arguments, $content, $parser, $shortcode, $extra = array()) { $string = parent::handle_shortcode($arguments, $content, $parser, $shortcode, $extra); $string = str_replace('></iframe' , ' loading="lazy"></iframe', $string); $string = str_replace('></iframe' , ' allowfullscreen></iframe', $string); return $string; } } |