wp-includes/feed.php:475Displays the rss enclosure for the current post.
One hook fires while rss_enclosure() runs, in this order:
Filters the RSS enclosure HTML link tag for the current post.
function rss_enclosure() { if ( post_password_required() ) { return; } foreach ( (array) get_post_custom() as $key => $val ) { if ( 'enclosure' === $key ) { foreach ( (array) $val as $enc ) { $enclosure = explode( "\n", $enc ); if ( count( $enclosure ) < 3 ) { continue; } // Only get the first element, e.g. 'audio/mpeg' from 'audio/mpeg mpga mp2 mp3'. $t = preg_split( '/[ \t]/', trim( $enclosure[2] ) ); $type = $t[0]; /** * Filters the RSS enclosure HTML link tag for the current post. * * @since 2.2.0 * * @param string $html_link_tag The HTML link tag with a URI and other attributes. */ echo apply_filters( 'rss_enclosure', '<enclosure url="' . esc_url( trim( $enclosure[0] ) ) . '" length="' . absint( trim( $enclosure[1] ) ) . '" type="' . esc_attr( $type ) . '" />' . "\n" ); } } }}Introduced in 1.5.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
src/wp-includes/feed.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.