function rs_wpss_comment_form_append() { if (rs_wpss_is_admin_sproc()) { return; } global $spamshield_options; if (empty($spamshield_options)) { $spamshield_options = get_option('spamshield_options'); } rs_wpss_update_session_data($spamshield_options); $promote_plugin_link = $spamshield_options['promote_plugin_link']; if (TRUE === WPSS_COMPAT_MODE || defined('WPSS_SOFT_COMPAT_MODE') || WPSS_Compatibility::comment_form()) { $wpss_key_values = rs_wpss_get_key_values(); $wpss_js_key = $wpss_key_values['wpss_js_key']; $wpss_js_val = $wpss_key_values['wpss_js_val']; global $wpss_ao_active; $ao_noop_open = $ao_noop_close = ''; if (empty($wpss_ao_active)) { $wpss_ao_active = rs_wpss_is_plugin_active('autoptimize/autoptimize.php'); } if (!empty($wpss_ao_active)) { $ao_noop_open = '<!--noptimize-->'; $ao_noop_close = '<!--/noptimize-->'; } echo WPSS_EOL . $ao_noop_open . '<script type=\'text/javascript\'>' . WPSS_EOL . '/* <![CDATA[ */' . WPSS_EOL . WPSS_REF2XJS . '=escape(document[\'referrer\']);' . WPSS_EOL . 'hf1N=\'' . $wpss_js_key . '\';' . WPSS_EOL . 'hf1V=\'' . $wpss_js_val . '\';' . WPSS_EOL . 'document.write("<input type=\'hidden\' name=\'' . WPSS_REF2XJS . '\' value=\'"+' . WPSS_REF2XJS . '+"\' /><input type=\'hidden\' name=\'"+hf1N+"\' value=\'"+hf1V+"\' />");' . WPSS_EOL . '/* ]]> */' . WPSS_EOL . '</script>' . $ao_noop_close; } echo WPSS_EOL . '<noscript><input type="hidden" name="' . WPSS_JSONST . '" value="NS1" /></noscript>' . WPSS_EOL; if (!empty($promote_plugin_link)) { $sip5c = '0'; $sip5c = substr(WPSS_SERVER_ADDR, 4, 1); /* Server IP 5th Char */ $ppl_code = array('0' => 0, '1' => 1, '2' => 2, '3' => 3, '4' => 4, '5' => 5, '6' => 6, '7' => 7, '8' => 8, '9' => 9, '.' => 10); if (preg_match("~^[0-9\\.]\$~", $sip5c)) { $int = $ppl_code[$sip5c]; } else { $int = 0; } echo WPSS_Promo_Links::comment_promo_link($int) . WPSS_EOL; } $wpss_js_disabled_msg = __('Currently you have JavaScript disabled. In order to post comments, please make sure JavaScript and Cookies are enabled, and reload the page.', WPSS_PLUGIN_NAME); $wpss_js_enable_msg = __('Click here for instructions on how to enable JavaScript in your browser.', WPSS_PLUGIN_NAME); echo '<noscript><p><strong>' . $wpss_js_disabled_msg . '</strong> <a href="http://enable-javascript.com/" rel="nofollow external" >' . $wpss_js_enable_msg . '</a></p></noscript>' . WPSS_EOL; /* If need to add anything else to comment area, start here */ }