function webform_options_custom_menu_local_tasks_alter in Webform 8.5
Same name and namespace in other branches
- 6.x modules/webform_options_custom/webform_options_custom.module \webform_options_custom_menu_local_tasks_alter()
Implements hook_menu_local_tasks_alter().
File
- modules/
webform_options_custom/ webform_options_custom.module, line 31 - Provides a custom options element.
Code
function webform_options_custom_menu_local_tasks_alter(&$data, $route_name) {
// Change config entities 'Translate *' tab to be just label 'Translate'.
if (isset($data['tabs'][0]["config_translation.local_tasks:entity.webform_options_custom.config_translation_overview"]['#link']['title'])) {
$data['tabs'][0]["config_translation.local_tasks:entity.webform_options_custom.config_translation_overview"]['#link']['title'] = t('Translate');
}
}