public static function print_colorblindness_field() { $field_name = 'use_colorblind'; printf('<select id="%1$s" name="nelioab_settings[%1$s]" %2$s>', $field_name, self::get_basic_details()); ?> <option value='0'><?php _e('Regular Palette', 'nelioab'); ?> </option> <option value='1'<?php if (NelioABSettings::use_colorblind_palette()) { echo ' selected="selected"'; } ?> ><?php _e('Colorblind Palette', 'nelioab'); ?> </option> </select> <div class="the-descr" style="display:none;"><span class="description"><?php _e('If you enable the Colorblind Palette, Nelio A/B Testing icons will not be simple, plain colors, but they will include visual clues.', 'nelioab'); ?> </span></div><?php }
/** * Returns PHPDOC * * @param int $status PHPDOC * * @return string PHPDOC * * @since PHPDOC */ public static function generate_status_light($status) { $cb = ''; if (NelioABSettings::use_colorblind_palette()) { $cb = ' status-colorblind'; } $light = '<div class="status-icon status-%s" title="%s"></div>'; switch ($status) { case NelioABGTest::WINNER_WITH_CONFIDENCE: $light = sprintf($light, 'tick' . $cb, sprintf(__('There is a clear winner, with a confidence greater than %s%%', 'nelioab'), NelioABSettings::get_min_confidence_for_significance())); break; case NelioABGTest::WINNER: $light = sprintf($light, 'star' . $cb, sprintf(__('There is a possible winner, but keep in mind the confidence does not reach %s%%', 'nelioab'), NelioABSettings::get_min_confidence_for_significance())); break; case NelioABGTest::NO_CLEAR_WINNER: $light = sprintf($light, 'clock' . $cb, __('There is not enough data to determine any winner', 'nelioab')); break; case NelioABGTest::NOT_ENOUGH_VISITS: $light = sprintf($light, 'clock' . $cb, __('There are not enough visits', 'nelioab')); break; case NelioABGTest::UNKNOWN: default: $light = sprintf($light, 'gray' . $cb, __('There are not enough visits', 'nelioab')); } return $light; }