MDL-58887 core: fix default title for action menu

Thanks to Michelle Melton <meltonml@appstate.edu> for the original
version of this patch.
This commit is contained in:
Ryan Wyllie 2017-11-22 01:27:56 +00:00
parent 4275ea4a43
commit 05df02a0ec

View File

@ -4464,7 +4464,9 @@ class action_menu implements renderable, templatable {
if ($actionicon instanceof pix_icon) {
$primary->icon = $actionicon->export_for_pix();
$primary->title = !empty($actionicon->attributes['alt']) ? $this->actionicon->attributes['alt'] : '';
if (!empty($actionicon->attributes['alt'])) {
$primary->title = $actionicon->attributes['alt'];
}
} else {
$primary->iconraw = $actionicon ? $output->render($actionicon) : '';
}