• Resolved Mevludin

    (@mevludin)


    Code and description:

    I have a question on getting the description and caption from WordPress’ Media Uploader through Javascript.
    I am using the media uploader thickbox button in my plugin.
    The code I have to get the src, title and etc is this:
    (
    window.send_to_editor = function (html) {
    var imgurl = jQuery(‘img’,html).attr(‘src’);
    var title = jQuery(‘img’,html).attr(‘title’);
    var width = jQuery(‘img’,html).attr(‘width’);
    var height = jQuery(‘img’,html).attr(‘height’)
    ….
    }
    )
    I’ve been looking around Google and WordPress’ support forum, but I haven’t seen anyone show or say how to get the description and caption from the image. Or maybe I overlooked someone’s post.
    Question:
    So I was wondering if there was a way to retrieve the description and caption from the images from my media. It can be via javascript or with php.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Plugin Media Uploader Description and Caption’ is closed to new replies.