@mkormendy
Thanks for writing. I’m the author of the plugin and here to answer your question.
Not directly using any of the functions I’ve provided via the Media-Tags plugin. This is on purpose as I’ve tried not to duplicate what is offered via the core WordPress functions.
So with that being said how would you get the Media-tag tags for a given attachment? Use the WP function
get_the_terms( $id = 0, $taxonomy ).
The first is the attachment ID. The second is the taxonomy and should be literally ‘MEDIA_TAGS_TAXONOMY’
For example your attachment ID is 45. Then the function would be:
$my_terms = get_the_terms(45, MEDIA_TAGS_TAXONOMY);
The $my_terms will be an array of the media-tags. You will need add some extra coding to build the output.
Alternately, if you want the comma-seperated list of media-tags for a given item you can call a different WP function
get_the_term_list( $id = 0, $taxonomy, $before = ”, $sep = ”, $after = ” )
Hope this helps.