Skip to content

Commit 93c52c3

Browse files
safroniksafronik
authored andcommitted
New: Adding default settings values for Anti-Bot and Anti-Crawler.
Fix: Spelling in code.
1 parent 3df24cf commit 93c52c3

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

lib/CleantalkState.php renamed to lib/Cleantalk/ApbctWP/State.php

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,13 @@ class CleantalkState
5050
public $storage = array();
5151
public $integrations = array();
5252
public $def_settings = array(
53-
54-
'spam_firewall' => 1,
55-
'apikey' => '',
56-
'autoPubRevelantMess' => 0,
53+
54+
'spam_firewall' => 1,
55+
'sfw__anti_crawler' => 0,
56+
'sfw__anti_crawler__view_limit' => 10,
57+
'sfw__bot_protection' => 0,
58+
'apikey' => '',
59+
'autoPubRevelantMess' => 0,
5760

5861
/* Forms for protection */
5962
'registrations_test' => 1,
@@ -349,12 +352,12 @@ private function getOption($option_name)
349352
* Save option to database
350353
*
351354
* @param string $option_name
352-
* @param bool $use_perfix
355+
* @param bool $use_prefix
353356
* @param bool $autoload Use autoload flag?
354357
*/
355-
public function save($option_name, $use_perfix = true, $autoload = true)
358+
public function save($option_name, $use_prefix = true, $autoload = true)
356359
{
357-
$option_name_to_save = $use_perfix ? $this->option_prefix.'_'.$option_name : $option_name;
360+
$option_name_to_save = $use_prefix ? $this->option_prefix . '_' . $option_name : $option_name;
358361
$arr = array();
359362
foreach($this->$option_name as $key => $value){
360363
$arr[$key] = $value;

0 commit comments

Comments
 (0)