Archived
This enables automagic updates of WP - Delete wordpress install - Move theme(s) to top - Move local plugins to ./plugins - Simplify i18n
20 lines
473 B
PHP
20 lines
473 B
PHP
<?php
|
|
/**
|
|
* Displays an audio player for every audio attachment to the current post.
|
|
*/
|
|
|
|
// Fetch all audio attachements
|
|
$attachments = get_children(
|
|
array(
|
|
'post_parent' => $post->ID,
|
|
'post_status' => 'inherit',
|
|
'post_type' => 'attachment',
|
|
'post_mime_type' => 'audio',
|
|
'order' => 'ASC',
|
|
'orderby' => 'menu_order'
|
|
)
|
|
);
|
|
|
|
foreach ( $attachments as $attachment ): ?>
|
|
<pre><?php the_attachment_link( $attachment->ID , false ); ?></pre>
|
|
<?php endforeach; ?>
|