Last active
March 18, 2022 14:14
-
-
Save adamsilverstein/9b384db1ff9f596e465712cdb6d017d3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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