Definition:
function atom_enclosure() {}
Display the atom enclosure for the current post.
Uses the global $post to check whether the post requires a password and if the user has the password for the post. If not then it will return before displaying.
Defined filters
- atom_enclosure
apply_filters('atom_enclosure', '<link href="' . trim(htmlspecialchars($enclosure[0])
Source code
function atom_enclosure() {
if ( post_password_required() )
return;
foreach ( (array) get_post_custom() as $key => $val ) {
if ($key == 'enclosure') {
foreach ( (array) $val as $enc ) {
$enclosure = split("\n", $enc);
echo apply_filters('atom_enclosure', '<link href="' . trim(htmlspecialchars($enclosure[0])) . '" rel="enclosure" length="' . trim($enclosure[1]) . '" type="' . trim($enclosure[2]) . '" />' . "\n");
}
}
}
}
539

February 11, 2011 


No comments yet... Be the first to leave a reply!