function nofollowlist_theme_registry_alter in Nofollow List 7
Implements hook_theme_registry_alter().
File
- ./
nofollowlist.module, line 55 - Provides a nofollowlist filter.
Code
function nofollowlist_theme_registry_alter(&$theme_registry) {
/**
* Preliminary benchmarks indicate that invoking theme() can slow down the l() function
* by 20% or more, and that some of the link-heavy Drupal pages spend more
* than 10% of the total page request time in the l() function.
*
* So if 'nofollowlist_everywhere' is disabled
* - delete 'nofollowlist_preprocess_link' from registry
*/
if (!variable_get('nofollowlist_everywhere', FALSE)) {
$functions = $theme_registry['link']['preprocess functions'];
$key = array_search('nofollowlist_preprocess_link', $functions);
unset($theme_registry['link']['preprocess functions'][$key]);
}
}