html(); } /** * Check if we should display the popup **/ private function html() { $user_browser = $this->get_browser(); $abc_options = $this->default_setting_values(); $check_browsers = $abc_options['check_browser']; $show_browsers = $abc_options['show_browser']; $title = $abc_options['title']; $message = $abc_options['msg']; $hide = $abc_options['hide']; $debug = $abc_options['debug']; if ($debug === 'on' && current_user_can('level_10')) { $old_ie = ($this->get_short_name($user_browser->Browser) === 'ie' && $user_browser->MajorVer < '8') ? 'old-ie' : ''; $this->build_html($title, $message, $show_browsers, $hide, $old_ie, $user_browser, $debug); } else { foreach($check_browsers as $browser => $version) { if ( $this->get_short_name($user_browser->Browser) === $browser && $user_browser->MajorVer <= $version && $user_browser->Platform != 'Android' && $user_browser->Platform != 'iOS' && $user_browser->Platform != 'BB10') { $old_ie = ($this->get_short_name($user_browser->Browser) === 'ie' && $user_browser->MajorVer < '8') ? 'old-ie' : ''; $this->build_html($title, $message, $show_browsers, $hide, $old_ie, $user_browser); } } } } /** * Build up the HTML for the popup **/ private function build_html($title = NULL, $msg = NULL, $show_browsers = array(), $hide = NULL, $old_ie = '', $user_browser = array(), $debug = false) { if ($debug) { $debug_html = '
';
$html .= $this->get_full_name($browser);
$html .= '';
$html .= '