function video_filter_democracynow_story in Video Filter 7.3
Callback for DemocracyNow story codec.
See also
1 string reference to 'video_filter_democracynow_story'
- video_filter_codec_info in ./
video_filter.codecs.inc - Implements hook_codec_info().
File
- ./
video_filter.codecs.inc, line 599 - This file contains all codecs provided by Video Filter.
Code
function video_filter_democracynow_story($video) {
$video['source'] = '//www.democracynow.org/embed/story/' . $video['codec']['matches'][0];
// The above is pulling in the url part of the regex, so we need to do a
// search and replace to remove it.
$toomuch = array(
"//www.democracynow.org/embed/story/democracynow.org/",
);
$justright = array(
"//www.democracynow.org/embed/story/",
);
$replaced = str_replace($toomuch, $justright, $video);
$video = $replaced;
return video_filter_iframe($video);
}