[wp-hackers] Custom field for enclosures
otto at ottodestruct.com
Fri Mar 19 13:26:23 UTC 2010
On Thu, Mar 18, 2010 at 5:54 PM, Karl Wångstedt <maillist at wangstedt.net> wrote:
> One of the sites I manage is a podcasting site, and I'm preparing a move to html5 (with <video>) and WP3 for it — hence the test site.
> It seems like the enclosure custom field isn't automatically generated when a video is linked to in the post anymore.
Check the mime type.
WordPress does a call to get the file via the webserver and looks at
the headers return. If the mime type that the webserver returns starts
with "video" or "audio" then it gets enclosed. So if your webserver
isn't configured to return the right mime type for that filetype, no
enclosure gets made.
This all happens in do_enclose, which gets called from do_all_pings,
which is hooked to the do_pings action, which is a scheduled event
created by the _publish_post_hook.
More information about the wp-hackers