In #2484843: Allow widgets to control how their "example" is rendered on the "Add content" dialog (including using a static image rather than rendering) Panopoly added the ability to define custom preview examples for widgets. The image preview could be improved by adding optional alt text.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | panopoly_magic-preview-image-alt-2981684-4.patch | 1.04 KB | cboyden |
Comments
Comment #2
cboyden commentedHere's a patch that looks for alt text for the image and passes 'alt' => NULL to the theme function if it's not set. Does this text need any sanitizing or translation? Should translation happen in the downstream hook implementation?
Comment #3
dsnopekOne two many '=' signs: this is the boolean operator rather than the assignment operator.
However, other than that, this idea looks good!
I think this is fine. The only way currently to set these values is in code, which means it's on that code to call
t()on the values it sets.Comment #4
cboyden commentedWhoops! See updated patch.
Comment #6
dsnopekThanks, committed!