Advertisements

atom_enclosure

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

Advertisements

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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: