Function: rss_enclosure

rss_enclosure( )

Display the rss enclosure for the current post.

Shortcut: re

You can use above key combination to trigger the associated snippet for this function in the WordPress Snippets for Visual Studio Code extension. You can also use this shortcut to search for this function on this website.

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.

Also uses the function get_post_custom() to get the post's 'enclosure' metadata field and parses the value to display the enclosure(s). The enclosure(s) consist of enclosure HTML tag(s) with a URI and other attributes.

WordPress Developer Newsletter

Stay informed of new chapter releases, important WordPress API updates and more.