Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I've gotten as far as creating my new tab and getting it to show up and I've taken a copy of the gallery screen (I'm making an audio plugin with a playlist feature). The list of media items shows up fine but I can only get it to show just the audio files when I don't pass a post ID into the get_media_items() function like in the media library tab.

How I can retrieve a media items list using get_media_items() where the post_parent field is set and the post_mime_type matches 'audio'?

share|improve this question
    
I believe you would use the function get_children codex.wordpress.org/Function_Reference/get_children –  Wyck Mar 26 '11 at 3:32

1 Answer 1

up vote 0 down vote accepted

The answer ended up being to copy that function and filter the results it returned. It's hacky but until there are more hooks/filters available in that section of the core there's no better way :(

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.