Merge pull request #174 from wilr/pr/172

Handle cases such as 'Class.RelationName'
This commit is contained in:
Will Rossiter 2020-11-20 09:53:35 +13:00 committed by GitHub
commit 56b25a424f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -168,6 +168,10 @@ class GoogleSitemapSiteTreeExtension extends GoogleSitemapExtension
$image = true;
}
} else {
if (strpos($type, '.') !== false) {
$type = explode('.', $type)[0];
}
if (singleton($type) instanceof Image) {
$image = true;
}