| 198 | | ?> |
| | 198 | function atom_enclosure() { |
| | 199 | global $id, $post; |
| | 200 | |
| | 201 | if ( !empty($post->post_password) && ($_COOKIE['wp-postpass_'.COOKIEHASH] != $post->post_password) ) { |
| | 202 | return; |
| | 203 | } |
| | 204 | |
| | 205 | $custom_fields = get_post_custom(); |
| | 206 | if ( is_array($custom_fields) ) { |
| | 207 | while ( list($key, $val) = each($custom_fields) ) { |
| | 208 | if ( $key == 'enclosure' ) { |
| | 209 | if ( is_array($val) ) { |
| | 210 | foreach ( (array) $val as $enc ) { |
| | 211 | $enclosure = split( "\n", $enc ); |
| | 212 | print "<link href='".trim( htmlspecialchars($enclosure[ 0 ]) )."' rel='enclosure' length='".trim( $enclosure[ 1 ] )."' type='".trim( $enclosure[ 2 ] )."'/>\n"; |
| | 213 | } |
| | 214 | } |
| | 215 | } |
| | 216 | } |
| | 217 | } |
| | 218 | |
| | 219 | ?> |
| | 220 | No newline at end of file |