Leave a Reply

1 comment

  1. Sounds like a custom TinyMCE button would be the ideal candidate for the job.

    WordPress has an excellent write-up in the codex on how to create one; you’d essentially add a button to the TinyMCE toolbar with your own callback, which could trigger a modal pop-up to choose the audio file & insert the shortcode automatically.

    Equally, you could hook into the output of media items once they’ve been uploaded, and display a link that would inject the shortcode for that item into the post (if uploaded within the Thickbox pop-up) – akin to how featured thumbnails work.

    Check out get_media_item() and get_attachment_fields_to_edit() in wp-admin/includes/media.php for available hooks and filters.