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

uploads - Wordpress Media Uploader events

programmeradmin3浏览0评论

I want to capture the click event on the "Save all changes" button?

Is there any callback method like there is when you click (window.send_to_editor) the "Insert into Post" button

I want to capture the click event on the "Save all changes" button?

Is there any callback method like there is when you click (window.send_to_editor) the "Insert into Post" button

Share Improve this question asked Aug 6, 2015 at 15:31 vlatkorunvlatkorun 1214 bronze badges 3
  • 2 Could you maybe use jQuery to add an event listener to the save all changes button based on its class when the modal is opened? – Moose Commented Apr 5, 2016 at 15:31
  • 2 how old is this WordPress version? – seot Commented Sep 6, 2016 at 12:01
  • @seot I have seen this upload UI in newest versions of WP. It seems to still be available for plugins to use. – Dan. Commented Nov 27, 2016 at 16:03
Add a comment  | 

2 Answers 2

Reset to default 1

I don't think there is. You will have to use some local (browser-based) Javascript code to attach a function to the on-click event of the button.

(Not a Javascript expert, but perhaps this will point you in a direction of investigation.)

You should got a class for that button Try to find it and, if exists, you can fire event i.e using jQuery:

jQuery(".button-class").click(...);

发布评论

评论列表(0)

  1. 暂无评论