List of available events for wp.media

Is there a list of available events for wp.media object?By doing some googling, I managed to find following events:for

Is there a list of available events for wp.media object? By doing some googling, I managed to find following events: for wp.media.view.Modal.prototype: open, ready - they are triggered, when user opens the Modal window.

The reason why I need this list is that I want to insert a select box on the right side, when user clicks an item on the Insert Media window. This select has to be formatted with Chosen library, but since the Backbone view is loaded only on user interaction, I need to know, on which event to initialize Chosen.

Please add other events in your answers.

Is there a list of available events for wp.media object? By doing some googling, I managed to find following events: for wp.media.view.Modal.prototype: open, ready - they are triggered, when user opens the Modal window.

The reason why I need this list is that I want to insert a select box on the right side, when user clicks an item on the Insert Media window. This select has to be formatted with Chosen library, but since the Backbone view is loaded only on user interaction, I need to know, on which event to initialize Chosen.

Please add other events in your answers.

Share Improve this question asked Sep 28, 2016 at 9:41 Kārlis BaumanisKārlis Baumanis 2102 silver badges6 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 10

If you're still looking for this kind of answer, one way of figuring out what is firing is by entering this in your browser console and using the media modal:

wp.media.frame.on('all', function(e) { console.log(e); });

You can install the plugin WordPress Media Javascript Guide. It explains with screenshots and examples the must use method of the wp.media object.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745574033a4633853.html

相关推荐

  • List of available events for wp.media

    Is there a list of available events for wp.media object?By doing some googling, I managed to find following events:for

    11小时前
    10

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信