mirror of
https://github.com/wilr/silverstripe-googlesitemaps.git
synced 2024-10-22 09:05:48 +00:00
17 lines
499 B
PHP
17 lines
499 B
PHP
<?php
|
|
// Ensure compatibility with PHP 7.2 ("object" is a reserved word),
|
|
// with SilverStripe 3.6 (using Object) and SilverStripe 3.7 (using SS_Object)
|
|
if (!class_exists('SS_Object')) {
|
|
class_alias('Object', 'SS_Object');
|
|
}
|
|
|
|
// add the extension to pages
|
|
if (class_exists('SiteTree')) {
|
|
SiteTree::add_extension('GoogleSitemapSiteTreeExtension');
|
|
}
|
|
|
|
// if you need to add this to DataObjects include the following in
|
|
// your own _config:
|
|
|
|
// GoogleSiteMap::register_dataobject('MyDataObject');
|