mirror of
https://github.com/silverstripe/silverstripe-comments
synced 2024-10-22 11:05:49 +02:00
NEW Only add comments to SiteTree objects if needed
This commit is contained in:
parent
2a20037e49
commit
99cf501393
@ -26,6 +26,6 @@
|
||||
* consult the Commenting class.
|
||||
*/
|
||||
|
||||
if(class_exists('SiteTree') && !Commenting::has_commenting('SiteTree')) {
|
||||
if(Config::inst()->get('Commenting', 'sitetree_comments') && class_exists('SiteTree') && !Commenting::has_commenting('SiteTree')) {
|
||||
Commenting::add('SiteTree');
|
||||
}
|
@ -19,6 +19,12 @@ class Commenting {
|
||||
*/
|
||||
private static $enabled_classes = array();
|
||||
|
||||
/**
|
||||
* @config
|
||||
* @var bool Whether to enable commenting on SiteTree objects by default
|
||||
*/
|
||||
private static $sitetree_comments = true;
|
||||
|
||||
/**
|
||||
* @var array default configuration values
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user