public static function is_defaulticon_allowed($mimetype, $oldextension = '') {
        $mimeinfo = get_mimetypes_array();
        if ($oldextension !== '') {
            unset($mimeinfo[$oldextension]);
        }
        foreach ($mimeinfo as $extension => $values) {
            if ($values['type'] !== $mimetype) {
                continue;
            }
            if (!empty($values['defaulticon'])) {
                return false;
            }
        }
        return true;
    }
public static function is_defaulticon_allowed($mimetype, $oldextension = '') {
        $mimeinfo = get_mimetypes_array();
        if ($oldextension !== '') {
            unset($mimeinfo[$oldextension]);
        }
        foreach ($mimeinfo as $extension => $values) {
            if ($values['type'] !== $mimetype) {
                continue;
            }
            if (!empty($values['defaulticon'])) {
                return false;
            }
        }
        return true;
    }
public static function is_defaulticon_allowed ( $ mimetype , $ oldextension = '' ) { $ mimeinfo = get_mimetypes_array ( ) ; if ( $ oldextension !== '' ) { unset ( $ mimeinfo [ $ oldextension ] ) ; } foreach ( $ mimeinfo as $ extension => $ values ) { if ( $ values [ 'type' ] !== $ mimetype ) { continue ; } if ( ! empty ( $ values [ 'defaulticon' ] ) ) { return false ; } } return true ; }
Checks if we are allowed to turn on the 'default icon' option. You can
only have one of these for a given MIME type.

@param string $mimetype MIME type
@param string $oldextension File extension name (before any change)
Checks if we are allowed to turn on the default icon option . You can only have one of these for a given MIME type .