Code Duplication    Length = 13-13 lines in 2 locations

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

_inc/lib/class.media.php 1 location

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