Skip to content

Instantly share code, notes, and snippets.

View mattonomics's full-sized avatar

Matt Gross mattonomics

  • Bonsai.io (OMC)
  • Lexington, KY
View GitHub Profile
@mjangda
mjangda / widget-post-save.js
Created September 9, 2010 20:21
Hook into the WordPress widget save javascript callback
jQuery(document).ajaxSuccess(function(e, xhr, settings) {
var widget_id_base = 'mywidget';
if(settings.data.search('action=save-widget') != -1 && settings.data.search('id_base=' + widget_id_base) != -1) {
alert('yay!');
// do other stuff
}
});