function video_theme_registry_alter in Video 7.2
Implements hook_theme_registry_alter().
Add a generic preprocess function to all video theme methods.
File
- ./
video.module, line 190 - All module hooks implementation can be found in this file.
Code
function video_theme_registry_alter(&$registry) {
// After upgrades, this class may not yet be in the class registry,
// so load the include explicitly.
if (!class_exists('video_utility', TRUE)) {
module_load_include('utility.inc', 'video');
}
$players = video_utility::getVideoPlayers();
$templates = array_keys($players);
$templates[] = 'video_flv';
$templates[] = 'video_html5';
foreach ($templates as $template) {
if (!isset($registry[$template])) {
continue;
}
if (!isset($registry[$template]['preprocess functions'])) {
$registry[$template]['preprocess functions'] = array();
}
$registry[$template]['preprocess functions'][] = 'video_preprocess_video_formatter_player';
}
}