Skip to content

Instantly share code, notes, and snippets.

@adamsilverstein
Last active March 18, 2022 14:14
Show Gist options
  • Save adamsilverstein/9b384db1ff9f596e465712cdb6d017d3 to your computer and use it in GitHub Desktop.
Save adamsilverstein/9b384db1ff9f596e465712cdb6d017d3 to your computer and use it in GitHub Desktop.
// When image uploads complete, trigger a check for additional mime types
//Extend the Uploader success.
jQuery.extend(wp.Uploader.prototype, {
success: function( file ) {
wp.ajax.post(
'media-create-image-mime-types',
{
_wpnonce: _wpPluploadSettings.defaults.multipart_params._wpnonce,
attachment_id: file.id,
}
);
}
// Call original success?
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment