| 1199 | | display: function( attachment ) { |
| | 1199 | display: function( attachment ) { |
| | 1200 | /* |
| | 1201 | * Attachment mime types to default 'Link To' to 'Attachment Page' |
| | 1202 | * See Core Trac Ticket #35153: https://core.trac.wordpress.org/ticket/35153 |
| | 1203 | */ |
| | 1204 | var mimeTypeDefaultLinkToAttachmentPage = [ |
| | 1205 | 'pdf', |
| | 1206 | 'csv', |
| | 1207 | 'zip', |
| | 1208 | 'gz|gzip', |
| | 1209 | 'rar', |
| | 1210 | '7z', |
| | 1211 | 'doc', |
| | 1212 | 'docx', |
| | 1213 | ]; |
| | 1214 | |
| | 1215 | /* |
| | 1216 | * If the selected media elements mimetype matches a value in our array, set to 'Link To' to 'Attachment Page' |
| | 1217 | */ |
| | 1218 | if( mimeTypeDefaultLinkToAttachmentPage.indexOf( attachment.attributes.subtype ) > -1 ) { |
| | 1219 | this._defaultDisplaySettings = { |
| | 1220 | link: 'file' |
| | 1221 | }; |
| | 1222 | } |
| | 1223 | |