I'd like to remove the titles in the menu, and assumed that I could just set:
settings[unset_menu_titles] = 1
To remove the blank title=""
attributes showing up in my sub-theme.
It doesn't seem to be working for me though.
Blank title fields are a bit of annoyance from what I understand for some screen readers, so looking to simply remove them from the menus so that they aren't displayed.
I had set that in my subtheme .info file themes/join_adaptivetheme/join_adaptivetheme.info
But then in grepping for that code also realized that it can be set in /admin/appearance/settings/join_adaptivetheme Extensions >> Markup Overrides
Remove menu link titles
Checking this setting will remove all menu link titles (tool tips). This only works for menu blocks.
I would think this would be greyed out since I set it in the .info file, but even with this set to true in both, I can't seem to eliminate the title.
I think this is better:
@@ -334,7 +334,7 @@ if (!function_exists('dhtml_menu_init')) {
$element['#localized_options']['html'] = TRUE;
}
- if (at_get_setting('unset_menu_titles', $theme_name) == 1 && !empty($element['#localized_options']['attributes']['title'])) {
+ if (at_get_setting('unset_menu_titles', $theme_name) == 1) {
unset($element['#localized_options']['attributes']['title']);
}
As after all I want to unset the title whether or not it is empty. I don't want empty titles.
Comments
Comment #1
mgiffordupdating
Comment #2
mgiffordComment #3
Jeff Burnz CreditAttribution: Jeff Burnz commentedThat should be faster also, I'll test it out, good call.
Comment #4
mgiffordThis was from a review via IBM, so ultimately I'm just chasing down their recommendation. Glad you liked it though.
Comment #5
Jeff Burnz CreditAttribution: Jeff Burnz commentedOK, I have done this (commit some time soon), but I have this niggly memory of there being a reason for the not empty check (fatal error sort of memories), could be a bug that has since been fixed in core, can't recall, when I wrote this stuff I was pretty sick so memories are not so good :/
Comment #6
Jeff Burnz CreditAttribution: Jeff Burnz commentedComment #7
mgiffordExcellent! Thanks. Glad your better too!