public function getShortcodeFields($class)
    {
        $fields = array();
        $ancestry = array_values(ClassInfo::dataClassesFor($class));

        foreach ($ancestry as $ancestor) {
            if (ClassInfo::classImplements($ancestor, 'TestOnly')) {
                continue;
            }

            $ancFields = DataObject::custom_database_fields($ancestor);
            if ($ancFields) {
                foreach ($ancFields as $ancFieldName => $ancFieldSpec) {
                    if (preg_match($this->fieldSpecRegex, $ancFieldSpec)) {
                        if (!@$fields[$ancestor]) {
                            $fields[$ancestor] = array();
                        }
                        $fields[$ancestor][$ancFieldName] = $ancFieldSpec;
                    }
                }
            }
        }

        return $fields;
    }