This repository has been archived on 2026-10-23. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
studentersamfundet.no/dns2015/audioplayer.php
T
nikolark 969c63c752 New style wordpress
This enables automagic updates of WP

- Delete wordpress install
- Move theme(s) to top
- Move local plugins to ./plugins
- Simplify i18n
2017-07-05 01:03:17 +02:00

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; ?>