Media currently has a number of old and unused theme implementations (see @TODO: Needs a major cleanup in media_theme()) which should be removed.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | media_link_usage_example.png | 35.57 KB | devin carlson |
| #1 | remove-unused-theme-implementations-1791492-1.patch | 3.48 KB | devin carlson |
Comments
Comment #1
devin carlson commentedA patch to remove all of the unused code.
Comment #2
ParisLiakos commentedok i tested the patch nothing, seems to break.
I am not sure about
media_linkthough. Any insight were this was being used? I found a rederence of it inhook_entity_info_alterwhich makes me wondering, need to search this moreComment #3
devin carlson commentedI actually came across that function while trying to solve an issue someone described on IRC.
media_link is used in Media 7.x-1.x to generate a link to a file with a generic file type icon. It's used on the admin/content/media page. I've attached a screenshot of it in use.
With the move to File entity for Media 7.x-2.x the function is no longer necessary (File entity takes care of generating the page).
The reference to media_link in hook_entity_info_alter is unrelated. It adds the additional "link" view mode to files and will actually be removed by #1051090: Revamp file view modes: migrate media_small to teaser, media_large to full, media_preview to preview; deprecate link & original.
Comment #4
ParisLiakos commentedawesome, thanks for the explanation
http://drupalcode.org/project/media.git/commit/49343d2