A module may want to change what gets displayed as the label below a thumbnail. Here's a quick improvement to theme_media_thumbnail() to make that possible. Eventually, we'll want to solve the flexible label issue generically in #910396: Implement the new entity label setting, but this is useful as an interim step.

Comments

JacobSingh’s picture

Status: Needs review » Needs work

I dont' get this part:

  // filename.
+  $variables['element']['#name'] = empty($variables['element']['#object']->filename) ? 'Filename' : $variables['element']['#object']->filename;
+}

Why the string "Filename"? I suppose there would always be a value for filename in the files table, but if there wasn't I would either have no filename or "unnamed $type"

Maybe I'm missing the point though. Otherwise fine.

effulgentsia’s picture

Status: Needs work » Fixed
StatusFileSize
new1.51 KB

Agreed with #1. Committed this patch instead.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.