[Plugin: Multiple Featured Images] Suggestion: Allow other mime types
With hardly any effort at all, this plugin can allow for other mime types to be used. At the very least it can simply allow them to be selected by the metabox.
A nice added feature would be to either create separate callbacks to generate proper presentation for the current item. So that if its a video, it throws in the oembed code for it, if its a PDF, it shows the PDF icon and the filename, etc. Alternatively, you could allow a parameter where developers can pass their own callback functions to set the metabox content.
The work I’m doing required me to allow PDF’s to be loaded – so i’m just throwing in the PDF icon and putting throwing the filename in.
These are fairly unsophisticated changes, they only work for PDF files, but I think it allows room for easily adding other mime_types.
All I’ve done is pass a conditional parameter to make it show an icon if its a pdf – of course theres much more that could be done – or it could simply be left this simple.
- The topic ‘[Plugin: Multiple Featured Images] Suggestion: Allow other mime types’ is closed to new replies.