Hi,
I am developing a custom module and I have used hook_theme_registry_alter hook for overriding theme function in my .module file.
I have done something like this:

function aml_theme_registry_alter (&$theme_registry) {
	dsm($theme_registry);
	$theme_registry['menu_link']['function'] = 'theme_menu_link';
}

and after that implemented the theme function in my module

function aml_menu_link (array $variables) {
	$output = '<div class ="active-menu-link">';
	$output .= t("This link is finally active");
	$output .= '</div>';
	
	return $output;
}

But not getting any output. Do I need to do anything more to see any output or get this function called somewhere
My module also implements aml_form_menu_edit_item_alter() and aml_submit() function

Comments

fxarte’s picture

Hi s_gupta_14,
you need to update your function setting to:

 ::
$theme_registry['menu_link']['function'] = 'aml_menu_link';