host = $host; $host->add_hook($host::HOOK_RENDER_ENCLOSURE, $this); } /** * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ function hook_render_enclosure($entry, $hide_images) { $matches = array(); if (preg_match("/\/\/www\.youtube\.com\/v\/([\w-]+)/", $entry["url"], $matches) || preg_match("/\/\/www\.youtube\.com\/watch?v=([\w-]+)/", $entry["url"], $matches) || preg_match("/\/\/youtu.be\/([\w-]+)/", $entry["url"], $matches)) { $vid_id = $matches[1]; return ""; } } function api_version() { return 2; } }