Code Duplication    Length = 13-13 lines in 2 locations

_inc/lib/class.media.php 1 location

@@ 91-103 (lines=13) @@
88
	 * 	
89
	 * @return array mime_type array
90
	 */
91
	static function get_allowed_mime_types( $default_mime_types ) {
92
		return array_unique( array_merge( $default_mime_types, array(
93
			'application/msword',                                                         // .doc
94
			'application/vnd.ms-powerpoint',                                              // .ppt, .pps
95
			'application/vnd.ms-excel',                                                   // .xls
96
			'application/vnd.openxmlformats-officedocument.presentationml.presentation',  // .pptx
97
			'application/vnd.openxmlformats-officedocument.presentationml.slideshow',     // .ppsx
98
			'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',          // .xlsx
99
			'application/vnd.openxmlformats-officedocument.wordprocessingml.document',    // .docx
100
			'application/vnd.oasis.opendocument.text',                                    // .odt
101
			'application/pdf',                                                            // .pdf
102
		) ) );
103
	}
104
105
	/**
106
	 * Checks that the mime type of the file

json-endpoints/class.wpcom-json-api-edit-media-v1-2-endpoint.php 1 location

@@ 86-98 (lines=13) @@
83
	 *
84
	 * @return {Array} mime_type array
85
	 */
86
	static function get_allowed_mime_types( $default_mime_types ) {
87
		return array_unique( array_merge( $default_mime_types, array(
88
			'application/msword',                                                         // .doc
89
			'application/vnd.ms-powerpoint',                                              // .ppt, .pps
90
			'application/vnd.ms-excel',                                                   // .xls
91
			'application/vnd.openxmlformats-officedocument.presentationml.presentation',  // .pptx
92
			'application/vnd.openxmlformats-officedocument.presentationml.slideshow',     // .ppsx
93
			'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',          // .xlsx
94
			'application/vnd.openxmlformats-officedocument.wordprocessingml.document',    // .docx
95
			'application/vnd.oasis.opendocument.text',                                    // .odt
96
			'application/pdf',                                                            // .pdf
97
		) ) );
98
	}
99
100
	/**
101
	 * Update the media post grabbing the post values from