mirror of
https://github.com/wilr/silverstripe-googlesitemaps.git
synced 2024-10-22 11:05:48 +02:00
FIX Changing alterCanIncludeInGoogleSitemap
to call owner object and extensions
At the moment `alterCanIncludeInGoogleSitemap` is only called on other extensions, but really we'd want to see this called on the owner object and its extensions. Fixed to use `invokeWithExtensions` rather than `extend`
This commit is contained in:
parent
9dcc00bafd
commit
e385b2f80c
@ -31,7 +31,7 @@ class GoogleSitemapExtension extends DataExtension {
|
|||||||
$can = $this->owner->getGooglePriority();
|
$can = $this->owner->getGooglePriority();
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->owner->extend('alterCanIncludeInGoogleSitemap', $can);
|
$this->owner->invokeWithExtensions('alterCanIncludeInGoogleSitemap', $can);
|
||||||
|
|
||||||
return $can;
|
return $can;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user