最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

media library - Javascript WP Object Documentation?

programmeradmin3浏览0评论

I was working on implementing the media library within one of my plugins/themes. I found a nice tutorial (/) that showed me how to do this using the JS object 'wp'

I can't seem to find any documentation on this in the codex or when Googling. How does one learn this object and its methods?

I was working on implementing the media library within one of my plugins/themes. I found a nice tutorial (http://mikejolley.com/2012/12/using-the-new-wordpress-3-5-media-uploader-in-plugins/) that showed me how to do this using the JS object 'wp'

I can't seem to find any documentation on this in the codex or when Googling. How does one learn this object and its methods?

Share Improve this question asked Jan 30, 2014 at 20:59 ShaneShane 1831 silver badge5 bronze badges 4
  • 2 See core.trac.wordpress.org/ticket/26870 for the current documentation efforts. – fuxia Commented Jan 30, 2014 at 21:04
  • Thanks for that! I'm curious how I see so many people using these objects without any documentation. Should I assume they went through the source like this person did and figured it out? – Shane Commented Jan 30, 2014 at 21:16
  • Either that, or they have written the core part. :) – fuxia Commented Jan 30, 2014 at 22:01
  • 1 This isn't "documentation" per se, but you can learn a lot from reading the source and observing how Wordpress itself leverages the Media Library JS. See github.com/WordPress/WordPress/blob/master/wp-includes/js/… – rinogo Commented Jun 22, 2017 at 18:56
Add a comment  | 

2 Answers 2

Reset to default 3

http://codex.wordpress.org/Javascript_Reference/wp

It's a work in progress. Contribute if you can!

Since there is still no real documentation in codex/developer docs, the only way is WordPress Trac:

https://core.trac.wordpress.org/browser/trunk#src/js/_enqueues/wp

All components are at least commented and each file has a header with a description.

发布评论

评论列表(0)

  1. 暂无评论