function video_cck_vimeo_extract in Embedded Media Field 5
hook video_cck_PROVIDER_extract this is called to extract the video code from a pasted URL or embed code.
Parameters
$embed: an optional string with the pasted URL or embed code
Return value
either an array of regex expressions to be tested, or a string with the video code to be used if the hook tests the code itself, it should return either the string of the video code (if matched), or an empty array. otherwise, the calling function will handle testing the embed code against each regex string in the returned array.
File
- contrib/
video_cck/ providers/ vimeo.inc, line 110
Code
function video_cck_vimeo_extract($embed = '') {
// http://vimeo.com/123456
// http://www.vimeo.com/123456
// http://vimeo.com/channels/hd#6912147
return array(
'@vimeo\\.com/[^\\"\\&\\d]*([^\\"\\&]+)@i',
);
}