I need to replace template_preprocess_links
with my own preprocess function and I can't find in the documentation how to replace a preprocess function entirely. Here is my current HOOK_theme implementation:
/**
* Implements hook_theme().
*/
function my_module_theme($existing, $type, $theme, $path)
{
return [
'links' => [
'variables' => [
'links' => NULL,
'raw_links' => NULL,
'attributes' => NULL,
'heading' => NULL
],
'override preprocess functions' => TRUE
]
];
}
But even with override preprocess functions
set to TRUE, the core template_preprocess_links
is still called and pollute the output with rendered links.
How can I replace this preprocess function entirely?