Added a set change frequency check.

Added a check to see if user has set the `set_change_frequency` in yml config.
This commit is contained in:
Nick Spiel 2014-05-14 14:32:19 +10:00
parent c756131242
commit 31eaba11f0
1 changed files with 4 additions and 0 deletions

View File

@ -78,6 +78,10 @@ class GoogleSitemapExtension extends DataExtension {
* @return SS_Datetime
*/
public function getChangeFrequency() {
if($freq = Config::inst()->get('GoogleSitemap', 'set_change_frequency')) {
return $freq;
}
if($freq = GoogleSitemap::get_frequency_for_class($this->owner->class)) {
return $freq;
}