WordPress.org

Support

Support » Plugins and Hacks » How to use wordpress 3.5 media uploader in my plugin?

How to use wordpress 3.5 media uploader in my plugin?

  • I’m trying to make a wordpress plugin and can’t figure out how to call the wordpress 3.5 new media uploader, I don’t know javascript so I’m trying to just figure it out from the examples. I have found this tutorial but can’t get it to work

    Please help me with this, it’s urgent!

    This is how I use it:

    1.I have the script in a separate js file

    2.I add this before the function displaying the form

    wp_enqueue_script('media_uploader', '/wp-content/plugins/video_manager/media_uploader.js', array('jquery') );
    3.html output

    <div class="uploader">
      <input type="text" name="settings[_unique_name]" id="_unique_name" />
      <input class="button" name="_unique_name_button" id="_unique_name_button" value="Upload" />
    </div>

    Nothing happpens when I press the upload button

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to use wordpress 3.5 media uploader in my plugin?’ is closed to new replies.