Skip to content

Instantly share code, notes, and snippets.

@LinzardMac
Created August 7, 2015 16:33
Show Gist options
  • Save LinzardMac/bbad4ad845b17fb62797 to your computer and use it in GitHub Desktop.
Save LinzardMac/bbad4ad845b17fb62797 to your computer and use it in GitHub Desktop.
wp.media.view.AttachmentCompat.prototype.events['change {all selectors found in the if statement below}'] = 'save';
if ( .name.length > 2 && '[]' == .name.substr( pair.name.length - 2 ) ) {
var pairName = .name.substr( 0, .name.length - 2 );
if ( pairName in data ) {
data[ pairName ] += ',' + .value;
} else {
data[ pairName ] = .value;
}
} else {
data[ .name ] = .value;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment