function the_player($marker_id) { $data = array(); $files = get_post_meta($marker_id, 'soundmap_attachments_id', FALSE); foreach ($files as $key => $value) { $file = array(); $att = get_post($value); $file['id'] = $value; $file['fileURI'] = wp_get_attachment_url($value); $file['filePath'] = get_attached_file($value); $file['info'] = soundmap_get_id3info($file['filePath']); $file['name'] = $att->post_name; $data['m_files'][] = $file; } add_player_interface($data['m_files'], $marker_id); }
<div class="post-content"> <?php echo apply_filters('the_content', get_the_content()); ?> <hr> <p class="marker-info"><?php echo __('Author', 'soundmap') . ': ' . $info['m_author']; ?> </br> <?php echo __('Date', 'soundmap') . ': ' . $info['m_date']; ?> </p> <hr> <?php add_player_interface($info['m_files'], $marker_id); ?> <hr class="clear"> <div class="marker-info"> <?php the_tags(__('Tags', 'soundmap') . ': ', ' | ', '</br>'); ?> <?php echo __('Categories', 'soundmap') . ': '; the_category(' | '); ?> </div> </div>