Exemplo n.º 1
0
 /**
  * Adds a headline alternative experiment in self::$headline_exps.
  *
  * @param NelioABHeadlineAlternativeExperiment $exp The Headline Alternative Experiment to be added.
  * @param int $alt_index The index of the alternative that this visitor is supposed to see.
  *
  * @since 4.0.0
  */
 private static function add_headline_exp($exp, $alt_index)
 {
     $alt = $exp->get_original();
     if ($alt_index > 0) {
         --$alt_index;
         $alts = $exp->get_alternatives();
         if ($alt_index < count($alts)) {
             $alt = $alts[$alt_index];
         }
     }
     self::$headline_exps[$exp->get_originals_id()] = array('exp' => $exp, 'alt' => $alt);
 }