/** * Retrieves the supported MIME types from Thumber that are also compatible with WordPress. * @return string[] The supported MIME types reported by the Thumber server. */ public function getMimeTypes() { global $dg_options; if (empty($dg_options['thumber-co']['mime_types'])) { // avoid values being removed as a result of current user but also include any MIME types // that are added outside of the default WP values $wp_types = array_merge(wp_get_mime_types(), get_allowed_mime_types()); $allowed = array_intersect($wp_types, parent::getMimeTypes()); $dg_options['thumber-co']['mime_types'] = array_keys($allowed); DocumentGallery::setOptions($dg_options); } return $dg_options['thumber-co']['mime_types']; }