Skip to content

Commit

Permalink
Fix. Settings. Real preson badge. Setting state fixed to run A/B test.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandergull committed Jun 27, 2024
1 parent 3af5817 commit fafd9ce
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/Cleantalk/ApbctWP/State.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class State extends \Cleantalk\Common\State
'comments__remove_comments_links' => 0, // Remove links from approved comments
'comments__show_check_links' => 1, // Shows check link to Cleantalk's DB.
'comments__manage_comments_on_public_page' => 0, // Allows to control comments on public page.
'comments__the_real_person' => 1, // Shows badge on each approved by cloud comments on public page.
'comments__the_real_person' => 0, // Shows badge on each approved by cloud comments on public page.
'comments__hide_website_field' => 0, // Hide website field from comment form

// Data processing
Expand Down Expand Up @@ -549,7 +549,9 @@ protected function setOptions()
$this->default_settings['data__email_decoder'] = rand(0, 1);
// A/B testing for the RealUserBadge setting: randomly on or off
// @ToDo remove this after testing
$this->default_settings['comments__the_real_person'] = rand(0, 1);
if ( ! is_array($option) ) {
$this->default_settings['comments__the_real_person'] = rand(0, 1);
}
$option = is_array($option) ? array_merge($this->default_settings, $option) : $this->default_settings;
}

Expand Down

0 comments on commit fafd9ce

Please sign in to comment.