88 posts
  • Author Level 3
  • Collector Level 1
  • 5 Years of Membership
  • Exclusive Author
DesignPuma
says

Some useful tutorial to all authors here about How to use WordPress 3.5 Media Uploader in Theme Options.
Special thanks to Ram Ratan Maurya

5 posts
  • Collector Level 1
  • 3 Years of Membership
  • Exclusive Author
  • India
RamRatanMaurya
says

Some useful tutorial to all authors here about How to use WordPress 3.5 Media Uploader in Theme Options.
Special thanks to Ram Ratan Maurya

Thanks for bringing this here. Previous code had some bugs which was preventing WordPress to ad new media from edit post screen once you uploaded a file which uses this code.

However, I have solved it and it works fine now. If you have used this code in your theme I suggest you to update it with latest code on site. Thanks.

44 posts
  • Elite Author
  • Author Level 9
  • Exclusive Author
  • Trendsetter
+5 more
DeliciousThemes
says

Thanks for sharing this resource. Although the old uploader is still there(WordPress allows us to make use of it to not break themes) keeping steps with WordPress is a must as it gets better and better each month.

501 posts
  • Affiliate Level 7
  • Author Level 10
  • Collector Level 2
  • Top Monthly Author
+10 more
pixelentity
says

The solution in the tutorial works but it only restores the default behaviour when the media uploader is opened by clicking on the “add media” button. This may not be always the case as a plugin or theme could use javascript for whatever reason.

Here’s an alternate method which relies on events to restore the original function after the image has been added or the uploader closed by clicking “close” button or using “ESC” key:

https://gist.github.com/4452118

BF

107 posts
  • 3 Years of Membership
  • Exclusive Author
mailmilisku
says

Some useful tutorial to all authors here about How to use WordPress 3.5 Media Uploader in Theme Options.
Special thanks to Ram Ratan Maurya
+1. Thanks!
501 posts
  • Affiliate Level 7
  • Author Level 10
  • Collector Level 2
  • Top Monthly Author
+10 more
pixelentity
says

The new media uploader api is amazing as much as its complete lack of documentation. So i started digging into the javascript sources, a few hours (and a good amount of blasphemies) later, i was able to come out with a working example:

WordPress 3.5 media upload api example

5 posts
  • Collector Level 1
  • 3 Years of Membership
  • Exclusive Author
  • India
RamRatanMaurya
says

pixelentity, that snippet does great. I was just about to post the same here. At the end result, I came up with same, but a slight different version of the same.

Here is the link to WP3.5 API

501 posts
  • Affiliate Level 7
  • Author Level 10
  • Collector Level 2
  • Top Monthly Author
+10 more
pixelentity
says

Needed to add a custom image filter, again no docs on the subject, most likely broken the swearing world record, here’s an example:

WordPress 3.5 media upload api: toolbar with custom filter

BF

116 posts YeahThemes
  • Trendsetter
  • Elite Author
  • Weekly Top Seller
  • Exclusive Author
+4 more
Yhthms
says

pixelentity, that snippet does great. I was just about to post the same here. At the end result, I came up with same, but a slight different version of the same. Here is the link to WP3.5 API

And use the on() function instead of live() because it have been deprecated.

116 posts YeahThemes
  • Trendsetter
  • Elite Author
  • Weekly Top Seller
  • Exclusive Author
+4 more
Yhthms
says

Needed to add a custom image filter, again no docs on the subject, most likely broken the swearing world record, here’s an example:

WordPress 3.5 media upload api: toolbar with custom filter

BF

Thanks for sharing this snippet ,dude!

by
by
by
by
by
by