Get file title/caption from Media Library
-
I have created a Custom Post Type with some custom metaboxes, one of which allows me to use the media library to upload/select from the database a pdf file and return its url into a text box.
Using jQuery to get the file url from the one of the many walk throughs, this snippet allows me to return the files url.
window.send_to_editor = function(html) { imgurl = jQuery(html).attr('href'); jQuery('#upload_image').val(imgurl); tb_remove(); }
My question is, is there a way to get the Title, Caption and Description values of the file. I have searched for an answer, and cannot seem to find any reference to getting these values. I would really be grateful if someone could throw me a pointer on how to get these values.
Thanks in advance.
- The topic ‘Get file title/caption from Media Library’ is closed to new replies.