Changed source root directory

This commit is contained in:
2026-03-05 16:30:11 +01:00
parent dc85447ee1
commit 538f85d7a2
5868 changed files with 749734 additions and 99 deletions

View File

@@ -0,0 +1,4 @@
.wpa-test-msg{background: #d1ecf1 !important; border: 1px solid #bee5eb !important; border-radius: 5px !important;color: #0c5460 !important; font-size: 14px !important; padding:.75rem 1.25rem !important; font-family: Arial !important; margin-top:5px !important;}
span.wpa-button{ display: inline-block !important; padding-top: 5px !important; color: #fff !important;background-color: #6c757d !important;border-color: #6c757d !important; padding: 5px 10px !important; border-radius: 5px !important; margin-top:5px !important; cursor: pointer !important; }
#altEmail_container, .altEmail_container{position:absolute !important; overflow: hidden !important; display: inline !important; height:1px !important; width: 1px !important;z-index:-1000 !important;}

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

View File

@@ -0,0 +1,16 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
/* BB PRESS */
if (!function_exists('wpae_get_blocked_integrations') || !in_array('bbpress', wpae_get_blocked_integrations())) :
add_action( 'bbp_new_topic_pre_extras','wpa_bbp_extra_validation');
add_action( 'bbp_new_reply_pre_extras','wpa_bbp_extra_validation');
function wpa_bbp_extra_validation(){
if (wpa_check_is_spam($_POST)){
do_action('wpa_handle_spammers','bbpress', $_POST);
bbp_add_error( 'bbp_extra_email', __( $GLOBALS['wpa_error_message'], 'bbpress' ) );
}
}
endif;

View File

@@ -0,0 +1,12 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
if (!function_exists('wpae_get_blocked_integrations') || !in_array('calderaforms', wpae_get_blocked_integrations())) :
function wpa_calderaforms_extra_validation( ) {
if (wpa_check_is_spam($_POST)){
do_action('wpa_handle_spammers','calderaforms', $_POST);
die($GLOBALS['wpa_error_message']);
}
};
add_action( 'caldera_forms_pre_load_processors', 'wpa_calderaforms_extra_validation', 10, 0 );
endif;

View File

@@ -0,0 +1,18 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
if (!function_exists('wpae_get_blocked_integrations') || !in_array('contactform7', wpae_get_blocked_integrations())) :
add_filter( 'wpcf7_validate', 'wpa_contactform7_extra_validation', 10, 2 );
function wpa_contactform7_extra_validation($result, $tags){
if ( empty( $result->get_invalid_fields() ) ) { // only check spam if validation OK (Imp for Level 2)
if (wpa_check_is_spam($_POST)){
do_action('wpa_handle_spammers','contactform7', $_POST);
$result->invalidate('', $GLOBALS['wpa_error_message']);
}
}
return $result;
}
endif;

View File

@@ -0,0 +1,30 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
if (!function_exists('wpae_get_blocked_integrations') || !in_array('diviengineform', wpae_get_blocked_integrations())) :
function my_df_before_process($form_id,$post_array,$form_type){
if (wpa_check_is_spam($_POST)){
foreach($_POST as $param => $value){
if(strpos($param, 'divi-form-submit') === 0){
$is_divi_engine_form = 'true';
$divi_engine_form_additional = esc_attr(str_replace('divi-form-submit', '', $param));
}
}
do_action('wpa_handle_spammers','divi_engine_form', $_POST);
if (str_ends_with($_SERVER["REQUEST_URI"],"admin-ajax.php")){
// ajax post
$result = array( 'result' => 'failed', 'redirect' => '', 'message' => '<B>' . esc_html($GLOBALS['wpa_error_message']) . '</B>', 'message_position' => 'after_button');
wp_send_json( $result );
}
else
{
echo "<div id='fb_form{$divi_engine_form_additional}'><p>".$GLOBALS['wpa_error_message']."</p><div></div></div>";
}
die();
}
}
add_action( 'df_before_process', 'my_df_before_process', 10, 3 );
endif;

View File

@@ -0,0 +1,31 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
if (!function_exists('wpae_get_blocked_integrations') || !in_array('diviform', wpae_get_blocked_integrations())) :
foreach($_POST as $param => $value){
if(strpos($param, 'et_pb_contactform_submit') === 0){
$is_divi_form = 'true';
$divi_form_additional = esc_attr(str_replace('et_pb_contactform_submit', '', $param));
}
}
if(!empty($is_divi_form) && $is_divi_form == 'true'){
if (wpa_check_is_spam($_POST)){
do_action('wpa_handle_spammers','divi_form', $_POST);
echo "<div id='et_pb_contact_form{$divi_form_additional}'><p>".esc_html($GLOBALS['wpa_error_message'])."</p><div></div></div>";
die();
} else { // REMOVE OUR TEST FIELD BEFORE SENDING TO DIVI
$fields_data_json = str_replace( '\\', '',$_POST['et_pb_contact_email_fields'.$divi_form_additional]);
$fields_data_array = json_decode( $fields_data_json, true );
if (is_array($fields_data_array)) {
$filteredArray = array_filter($fields_data_array, function ($item) {
return $item['field_id'] !== 'alt_s'
&& $item['field_id'] !== $GLOBALS['wpa_field_name'];
});
$_POST['et_pb_contact_email_fields'.$divi_form_additional] = json_encode( $filteredArray, JSON_UNESCAPED_UNICODE );
}
}
}
endif;

View File

@@ -0,0 +1,16 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
if (!function_exists('wpae_get_blocked_integrations') || !in_array('elementor', wpae_get_blocked_integrations())) :
function wpa_elementor_extra_validation( $record, $ajax_handler ) {
if (wpa_check_is_spam($_POST)){
$all_fields = $record->get( 'fields' );
$firstField = array_key_first($all_fields);
do_action('wpa_handle_spammers','elementor', $_POST);
$ajax_handler->add_error($all_fields[$firstField]['id'], $GLOBALS['wpa_error_message']);
}
};
add_action( 'elementor_pro/forms/validation', 'wpa_elementor_extra_validation', 10, 2 );
endif;

View File

@@ -0,0 +1,17 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
if (!function_exists('wpae_get_blocked_integrations') || !in_array('fluentform', wpae_get_blocked_integrations())) :
function wpa_fluent_form_extra_validation($insertData, $data, $form) {
if (wpa_check_is_spam($data)){
do_action('wpa_handle_spammers','fluent_forms', $data);
//die($GLOBALS['wpa_error_message']);
wp_send_json_error(['errors' => $GLOBALS['wpa_error_message']]);
wp_die();
}
};
//add_action( 'fluentform_before_insert_submission', 'wpa_fluent_form_extra_validation', 10, 3 );
add_action( 'fluentform/before_insert_submission', 'wpa_fluent_form_extra_validation', 10, 3 );
endif;

View File

@@ -0,0 +1,16 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
if (!function_exists('wpae_get_blocked_integrations') || !in_array('formidable', wpae_get_blocked_integrations())) :
add_filter( 'frm_validate_entry', 'wpa_formidable_extra_validation', 10, 2 );
function wpa_formidable_extra_validation($errors, $values){
if (wpa_check_is_spam($_POST)){
do_action('wpa_handle_spammers','formidable', $_POST);
$errors['my_error'] = $GLOBALS['wpa_error_message'];
}
return $errors;
}
endif;

View File

@@ -0,0 +1,19 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
if (!function_exists('wpae_get_blocked_integrations') || !in_array('gravityforms', wpae_get_blocked_integrations())) :
add_action( 'gform_validation', 'wpa_gravityforms_extra_validation');
function wpa_gravityforms_extra_validation($validation_result ){
if (wpa_check_is_spam($_POST)){
$form = $validation_result['form'];
do_action('wpa_handle_spammers','gravityforms', $_POST);
$validation_result['is_valid'] = false;
$form['fields'][0]->failed_validation = true;
$form['fields'][0]->validation_message = $GLOBALS['wpa_error_message'];
$validation_result['form'] = $form;
}
return $validation_result;
}
endif;

View File

@@ -0,0 +1,18 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
if (!function_exists('wpae_get_blocked_integrations') || !in_array('toolsetform', wpae_get_blocked_integrations())) :
add_filter('cred_form_validate','wpa_toolsetform_extra_validation',20,2);
function wpa_toolsetform_extra_validation($error_fields, $form_data)
{
list($fields,$errors)=$error_fields;
if (wpa_check_is_spam($_POST)){
do_action('wpa_handle_spammers','toolset_form', $_POST);
die($GLOBALS['wpa_error_message']);
}
return array($fields,$errors);
}
endif;

View File

@@ -0,0 +1,17 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
// WP Comments // TESTED WITH LEVEL2. Working FINE
if (!function_exists('wpae_get_blocked_integrations') || !in_array('wpcomment', wpae_get_blocked_integrations())) :
add_filter( 'preprocess_comment', 'wpa_wpcomment_extra_validation' );
function wpa_wpcomment_extra_validation( $commentdata ) {
if (wpa_check_is_spam($_POST)){
do_action('wpa_handle_spammers','wpcomment', $_POST);
wp_die( __( $GLOBALS['wpa_error_message'] ) );
}
return $commentdata;
}
endif;

View File

@@ -0,0 +1,15 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
if (!function_exists('wpae_get_blocked_integrations') || !in_array('wpforms', wpae_get_blocked_integrations())) :
add_filter( 'wpforms_process_before', 'wpa_wpforms_extra_validation', 10, 2 );
function wpa_wpforms_extra_validation($entry, $form_data){
if (wpa_check_is_spam($_POST)){
do_action('wpa_handle_spammers','wpforms', $_POST);
wpforms()->process->errors[ $form_data['id'] ][ '0' ] = $GLOBALS['wpa_error_message'];
}
}
endif;

View File

@@ -0,0 +1,41 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
if (!function_exists('wpae_get_blocked_integrations') || !in_array('wp_login_form', wpae_get_blocked_integrations())) :
function wpa_wplogin_add_initiator_field() {
echo '<input type="hidden" id="wpa_initiator" class="wpa_initiator" name="wpa_initiator" value="" />';
}
add_action('lostpassword_form', 'wpa_wplogin_add_initiator_field');
add_action('woocommerce_lostpassword_form', 'wpa_wplogin_add_initiator_field');
add_action( 'login_form', 'wpa_wplogin_add_initiator_field' );
add_action( 'woocommerce_login_form', 'wpa_wplogin_add_initiator_field' ); // FIX FOR WOOCOMMERCE LOGIN.
function wpae_wplogin_extra_validation( $user, $username, $password ) {
if ( ! empty( $_POST ) ) {
if (wpa_check_is_spam($_POST)){
$postData = $_POST;
$postData['pwd'] = '**removed**';
do_action('wpa_handle_spammers','wplogin', $postData);
return new WP_Error( 'error', $GLOBALS['wpa_error_message']);
}
}
//return $user;
}
add_filter( 'authenticate', 'wpae_wplogin_extra_validation', 10, 3 );
function wpae_lostpassword_extra_validation( $errors ) {
if ( is_admin() ) { return; }
if (wpa_check_is_spam($_POST)){
do_action('wpa_handle_spammers','losspassword', $_POST);
$errors->add( 'user_login', __($GLOBALS['wpa_error_message']) );
}
}
add_action( 'lostpassword_post', 'wpae_lostpassword_extra_validation' );
endif;

View File

@@ -0,0 +1,25 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
if (!function_exists('wpae_get_blocked_integrations') || !in_array('wpregistration', wpae_get_blocked_integrations())) :
add_action( 'register_form', 'wpa_wpregistration_add_initiator_field' );
function wpa_wpregistration_add_initiator_field() {
echo '<input type="hidden" id="wpa_initiator" class="wpa_initiator" name="wpa_initiator" value="" />';
}
add_filter( 'registration_errors', 'wpa_wpregistration_extra_validation', 10, 3 );
function wpa_wpregistration_extra_validation( $errors, $sanitized_user_login, $user_email ) {
if (wpa_check_is_spam($_POST)){
do_action('wpa_handle_spammers','wpregistration', $_POST);
if ( !is_object( $errors ) ) { $errors = new WP_Error(); }
$errors->add( 'wpa_extra_email', __($GLOBALS['wpa_error_message']) );
}
return $errors;
}
endif;

View File

@@ -0,0 +1,128 @@
var wpa_field_name, wpa_unique_id, wpa_add_test, wpa_hidden_field;
jQuery(document).ready(function(){
wpa_field_name = wpa_field_info.wpa_field_name;
wpa_unique_id = wpa_field_info.wpa_field_value;
wpa_add_test = wpa_field_info.wpa_add_test;
wpa_hidden_field = "<div id='altEmail_container' class='altEmail_container'><label for='alt_s'>Alternative:</label><input type='text' id='alt_s' name='alt_s' ></div><span class='wpa_hidden_field' style='display:none;height:0;width:0;'><label>WPA <input type='text' name='"+wpa_field_name+"' value='"+wpa_unique_id+"' /></label></span>";
wpa_add_honeypot_field();
if (typeof wpae_add_honeypot_field == 'function') { // IF EXTENDED version exists.
wpae_add_honeypot_field();
}
if (wpa_add_test == 'yes'){
wpa_add_test_block();
}
});
function wpa_act_as_spam(){
actiontype = jQuery('span.wpa-button').data('actiontype');
if (actiontype == 'remove'){
wpa_remove_honeypot_field();
jQuery('span.wpa-button').data('actiontype','add');
jQuery('span.wpa-button').html('Acting as Spam Bot');
} else {
wpa_add_honeypot_field();
jQuery('span.wpa-button').data('actiontype','remove');
jQuery('span.wpa-button').html('Act as Spam Bot');
}
}
function wpa_add_honeypot_field(){
// Combined form selectors
var allFormSelectors = [
// Main forms
'form.wpcf7-form, .wpcf7 form', // CONTACT FORM 7
'form.wpforms-form', // WPForms
'.gform_wrapper form', // Gravity Forms
'.frm_forms form', // Formidable Forms
'.caldera-grid form', // Caldera Forms
'.wp-block-toolset-cred-form form', // Toolset Forms
'form.cred-user-form', // Toolset Forms
'form.cred-form', // Toolset Forms
'form.et_pb_contact_form', // Divi Form
'form.fb_form', // Divi Form Builder - Divi Engine
'form.elementor-form', // Elementor
'form.form-contribution', // WooCommerce Reviews Pro
'form.cart', // WooCommerce Cart
'form#learn-press-checkout-form', // LearnPress Checkout Form
'form.wpa_form', // Generic Class
'.wpa_form form', // Generic Class
'.um-form form', // Ulimate Membership Form
// Login forms
'form.spectra-pro-login-form', // SPECTRA LOGIN FORM
'form#loginform', // Default Login Form
'form#edd_login_form', // EDD LOGIN FORM
'form.uwp-login-form', // USER WP LOGIN FORM
'.et_pb_login_form form', // For Elementor login form
'form.eael-login-form', // essential-addons login form
'form.user-registration-form-login', // User Registration & Membership for WordPress
'form#lostpasswordform', // Lost Password Form
'form.lost_reset_password', // Tutor Password Form
'form.ur_lost_reset_password', // User Registration & Membership for WordPress
//Registration Forms
'form.register', // User Registration & Membership for WordPress
// Comment forms
'form#commentform', // WP Comment with ID
'form.ast-commentform', // Astra Comment Form with class
'form#fl-comment-form', // Beaver Builder Theme Form with ID
'form.comment-form', // WP Comment with class
'.review-form form', // LearnPress Review
'form#edd-reviews-form', // EDD Reviews with ID
'form.wpr-comment-form',
// BBPress forms
'.bbp-topic-form form', // BBPress Topic Form
'.bbp-reply-form form' // BBPress Reply Form
];
// Append hidden field to all forms in the combined selector list
jQuery(allFormSelectors.join(', ')).append(wpa_hidden_field);
// FOR FLUENT FORMS
jQuery('form.frm-fluent-form').append(wpa_hidden_field); // FOR Fluent Forms
jQuery('.ff_conv_app').append(wpa_hidden_field); // FOR Fluent Convertional Forms
if (typeof fluent_forms_global_var_1 !== 'undefined') { // QUICK HACK FOR FLUENT FORMS CONVERSIONAL
fluent_forms_global_var_1.extra_inputs[wpa_field_name] = wpa_unique_id;
fluent_forms_global_var_1.extra_inputs['alt_s'] = '';
}
// EOF FLUENT FORMS
jQuery('input.wpa_initiator').each(function() {
var $form = jQuery(this).closest('form'); // Get the parent form of input.wpa_initiator
// Check if wpa_hidden_field exists in the form, if not, insert it after input.wpa_initiator
if ($form.find('.wpa_hidden_field').length === 0) {
jQuery(wpa_hidden_field).insertAfter(this);
}
});
}
function wpa_add_test_block(){
checkingTest = '<div class="wpa-test-msg"><strong>WP Armour ( Only visible to site administrators. Not visible to other users. )</strong><br />This form has a honeypot trap enabled. If you want to act as spam bot for testing purposes, please click the button below.<br/><span class="wpa-button" onclick="wpa_act_as_spam()" data-actiontype="remove">Act as Spam Bot</span></div>';
jQuery('.wpa-test-msg').remove(); // Clear First
jQuery('span.wpa_hidden_field').after(checkingTest);
}
function wpa_remove_honeypot_field(){
jQuery('.wpa_hidden_field').remove();
jQuery('#altEmail_container, .altEmail_container').remove();
if (typeof fluent_forms_global_var_1 !== 'undefined') {
delete fluent_forms_global_var_1.extra_inputs[wpa_field_name];
delete fluent_forms_global_var_1.extra_inputs['alt_s'];
}
}

View File

@@ -0,0 +1,131 @@
var wpa_field_name, wpa_unique_id, wpa_add_test, wpa_hidden_field;
document.addEventListener('DOMContentLoaded', function() {
wpa_field_name = wpa_field_info.wpa_field_name;
wpa_unique_id = wpa_field_info.wpa_field_value;
wpa_add_test = wpa_field_info.wpa_add_test;
wpa_hidden_field = "<div id='altEmail_container' class='altEmail_container'><label for='alt_s'>Alternative:</label><input type='text' id='alt_s' name='alt_s' ></div><span class='wpa_hidden_field' style='display:none;height:0;width:0;'><label>WPA <input type='text' name='"+wpa_field_name+"' value='"+wpa_unique_id+"' /></label></span>";
wpa_add_honeypot_field();
if (typeof wpae_add_honeypot_field === 'function') { // IF EXTENDED version exists.
wpae_add_honeypot_field();
}
if (wpa_add_test === 'yes') {
wpa_add_test_block();
}
});
function wpa_act_as_spam() {
const wpaButton = document.querySelector('span.wpa-button');
const actiontype = wpaButton.dataset.actiontype;
if (actiontype === 'remove') {
wpa_remove_honeypot_field();
wpaButton.dataset.actiontype = 'add';
wpaButton.textContent = 'Acting as Spam Bot';
} else {
wpa_add_honeypot_field();
wpaButton.dataset.actiontype = 'remove';
wpaButton.textContent = 'Act as Spam Bot';
}
}
function wpa_add_honeypot_field() {
// Combined form selectors
const allFormSelectors = [
// Main forms
'form.wpcf7-form, .wpcf7 form', // CONTACT FORM 7
'form.wpforms-form', // WPForms
'.gform_wrapper form', // Gravity Forms
'.frm_forms form', // Formidable Forms
'.caldera-grid form', // Caldera Forms
'.wp-block-toolset-cred-form form', // Toolset Forms
'form.cred-user-form', // Toolset Forms
'form.cred-form', // Toolset Forms
'form.et_pb_contact_form', // Divi Form
'form.fb_form', // Divi Form Builder - Divi Engine
'form.elementor-form', // Elementor
'form.form-contribution', // WooCommerce Reviews Pro
'form.cart', // WooCommerce Cart
'form#learn-press-checkout-form', // LearnPress Checkout Form
'form.wpa_form', // Generic Class
'.wpa_form form', // Generic Class
'.um-form form', // Ulimate Membership Form
// Login forms
'form.spectra-pro-login-form', // SPECTRA LOGIN FORM
'form#loginform', // Default Login Form
'form#edd_login_form', // EDD LOGIN FORM
'form.uwp-login-form', // USER WP LOGIN FORM
'.et_pb_login_form form', // For Elementor login form
'form.eael-login-form', // essential-addons login form
'form.user-registration-form-login', // User Registration & Membership for WordPress
'form#lostpasswordform', // Lost Password Form
'form.lost_reset_password', // Tutor Password Form
'form.ur_lost_reset_password', // User Registration & Membership for WordPress
//Registration Forms
'form.register', // User Registration & Membership for WordPress
// Comment forms
'form#commentform', // WP Comment with ID
'form.ast-commentform', // Astra Comment Form with class
'form#fl-comment-form', // Beaver Builder Theme Form with ID
'form.comment-form', // WP Comment with class
'.review-form form', // LearnPress Review
'form#edd-reviews-form', // EDD Reviews with ID
'form.wpr-comment-form',
// BBPress forms
'.bbp-topic-form form', // BBPress Topic Form
'.bbp-reply-form form' // BBPress Reply Form
];
const forms = document.querySelectorAll(allFormSelectors.join(', '));
forms.forEach(form => {
form.insertAdjacentHTML('beforeend', wpa_hidden_field);
});
// FOR FLUENT FORMS
const fluentForms = document.querySelectorAll('form.frm-fluent-form, .ff_conv_app');
fluentForms.forEach(form => {
form.insertAdjacentHTML('beforeend', wpa_hidden_field);
});
if (typeof fluent_forms_global_var_1 !== 'undefined') { // QUICK HACK FOR FLUENT FORMS CONVERSIONAL
fluent_forms_global_var_1.extra_inputs[wpa_field_name] = wpa_unique_id;
fluent_forms_global_var_1.extra_inputs['alt_s'] = '';
}
// EOF FLUENT FORMS
const wpaInitiators = document.querySelectorAll('input.wpa_initiator');
wpaInitiators.forEach(initiator => {
const form = initiator.closest('form');
if (form && !form.querySelector('.wpa_hidden_field')) {
initiator.insertAdjacentHTML('afterend', wpa_hidden_field);
}
});
}
function wpa_add_test_block() {
const checkingTest = '<div class="wpa-test-msg"><strong>WP Armour ( Only visible to site administrators. Not visible to other users. )</strong><br />This form has a honeypot trap enabled. If you want to act as spam bot for testing purposes, please click the button below.<br/><span class="wpa-button" onclick="wpa_act_as_spam()" data-actiontype="remove">Act as Spam Bot</span></div>';
document.querySelectorAll('.wpa-test-msg').forEach(el => el.remove());
document.querySelectorAll('span.wpa_hidden_field').forEach(span => {
span.insertAdjacentHTML('afterend', checkingTest);
});
}
function wpa_remove_honeypot_field() {
document.querySelectorAll('.wpa_hidden_field, #altEmail_container, .altEmail_container').forEach(el => el.remove());
if (typeof fluent_forms_global_var_1 !== 'undefined') {
delete fluent_forms_global_var_1.extra_inputs[wpa_field_name];
delete fluent_forms_global_var_1.extra_inputs['alt_s'];
}
}

View File

@@ -0,0 +1,47 @@
<?php if ( ! defined( 'ABSPATH' ) ) exit; ?>
<style type="text/css">
.why_extended{padding: 10px; font-size: 14px;}
.why_extended ul li{ padding-bottom: 20px; width: 285px; float: left; margin:10px 20px 10px 0px;border: 1px solid #d0d0d0; background: #d8d8d8; height: 150px; border-radius: 5px; padding: 10px; line-height: 1.5;}
.why_extended ul label{display: block;padding-bottom: 10px; font-size: 15px; color: #000; font-weight: 500;}
</style>
<div class="why_extended">
<h3>Extra Tools that WP Armour Extended offers to make WP Armour more powerfull.</h3>
<ul>
<li><label>Additional Support</label>
* WooCommerce & Easy Digital Downloads <br/>
* QuForm, MC4WP, HTMLform plugin<br/>
* BuddyPress, BuddyBoss<br/>
* NinjaForms, S2 Member, Avia Enfold Theme<br/>
* Gravity Forms (For Ajax enabled and multi page form) and more..
</li>
<!--
<li><label>2 Level Spam Check</label>
Our lite version should block most of the spam bot submission. But if you are still getting spam submission, you can enable 2 level spam check in Extended version from Extended Settings tab.
</li> -->
<li><label>Record Spammer IP</label>
Record spammers' IPs to block them from future submissions.
</li>
<li><label>View Spam Submission</label>
See what data spam bot was trying to submit.
</li>
<li><label>Auto Block Spam Bot IP</label>
Allows you to block the spam bot IP so that they can't visit your website.
</li>
<li><label>Get HoneyPot Extended Now !</label>
Get WP Armour Extended and make WP Armour more powerful.
<br/>
<a href="https://dineshkarki.com.np/buy-wp-armour-extended" target="_blank" class="button" style="float: right;">GET IT NOW</a>
</li>
<li><label>Don't need WP Armour Extended Tools ?</label>
In the long run, spam bots learn how to bypass antispam systems. Staying on top of new methodologies is key. You can motivate us to continue development of the plugin by getting a license for the WP Armour Extended.
</li>
</ul>
</div>

View File

@@ -0,0 +1,52 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
if (isset($_POST['submit-wpa-general-settings'])){
$saveReturn = wpa_save_settings();
}
if (isset($_POST['submit-wpae-general-settings'])){
$saveReturn = wpae_save_settings();
}
if (isset($_POST['submit-wpae-whitelist_ips'])){
$saveReturn = wpae_save_whitelist_ips();
}
if (isset($_POST['submit-wpae-integrations'])){
$saveReturn = wpae_save_integrations();
}
if (isset($_GET['tab']) && array_key_exists($_GET['tab'],$wpa_tabs)){
$currentTab = $_GET['tab'];
} else {
$currentTab = 'settings';
}
?>
<?php if (isset($saveReturn)):?>
<div class="updated <?php echo $saveReturn['status']; ?>" id="message"><p><?php echo $saveReturn['body']; ?></p></div>
<?php endif; ?>
<div class="wrap">
<h1>WP Armour - HoneyPot Anti Spam</h1>
<nav class="nav-tab-wrapper">
<?php foreach ($wpa_tabs as $tabKey => $tabData) { ?>
<a href="<?php echo admin_url(); ?>admin.php?page=wp-armour&tab=<?php echo $tabKey; ?>" class="nav-tab <?php echo $currentTab == $tabKey?'nav-tab-active':''; ?>"><?php echo $tabData['name']; ?></a>
<?php } ?>
</nav>
<div class="tab-content">
<table width="100%">
<tr>
<td valign="top">
<?php include($wpa_tabs[$currentTab]['path']); ?>
</td>
<td width="15">&nbsp;</td>
<td width="250" valign="top"><?php include('wpa_sidebar.php'); ?></td>
</tr>
</table>
</div>
</div>

View File

@@ -0,0 +1,103 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
add_action('admin_notices', 'wpa_admin_notices');
if (isset($_GET['wpa_reviews_notice_hide']) == 1){
update_option('wpa_reviews_notice_hide','yes');
}
if (isset($_GET['wpa_pateron_notice_hide']) == 1){
update_option('wpa_pateron_notice_hide','yes');
}
if (isset($_GET['wpa_extended_notice_hide']) == 1){
update_option('wpa_extended_notice_hide','yes');
}
function wpa_admin_notices(){
// FOR OLD EXTENDED VERSION
if(is_plugin_active( 'wp-armour-extended/wp-armour-extended.php' ) ) {
if ($GLOBALS['wpae_version'] < 1.17 ){
echo '<div class="notice notice-error is-dismissible">
<p><strong style="color:#900;">IMPORTANT : </strong> Your are using older version of WP Armour Extended. Please update to 1.17 or above for it to work properly.</p>
</div>';
}
}
if (current_user_can( 'manage_options' )): // ONLY SHOW IF ADMIN
// FOR REVIEWS
if (get_option('wpa_reviews_notice_hide') != 'yes'){
$installedDate = strtotime(get_option('wpa_installed_date'));
$todayDate = time();
$installedDays = round(($todayDate - $installedDate) / (60 * 60 * 24));
$wpa_stats = json_decode(get_option('wpa_stats'),true);
$all_spam_blocked = $wpa_stats ? $wpa_stats['total']['all_time'] : 0;
if ($installedDays > 30 && $all_spam_blocked > 30){
echo '<div class="updated success" style="padding:10px; font-size:16px; line-height:1.6;color:#205225;">
Hey, WP Armour has blocked <strong>'.$all_spam_blocked.'</strong> spam submissions till date - thats awesome! Could you please do us a BIG favor and give it a 5-star rating on WordPress ? Just to help us spread the word and boost our motivation.<br/><br/>
<ul style="padding-left:50px;list-style-type: square;">
<li><a href="https://wordpress.org/support/plugin/honeypot/reviews/?filter=5" target="_blank">Ok, you deserve it</a></li>
<li><a href="https://dineshkarki.com.np/contact" target="_blank">I still have problem !!</a></li>
<li><a href="'.admin_url("admin.php?page=wp-armour&wpa_reviews_notice_hide=1").'">I already did</a></li>
<li><a href="'.admin_url("admin.php?page=wp-armour&wpa_reviews_notice_hide=1").'">Hide this message</a></li>
</ul>
</div>';
}
}
// FOR PATERON
if (!is_plugin_active('wp-armour-extended/wp-armour-extended.php')){
if (get_option('wpa_pateron_notice_hide') != 'yes'){
$installedDate = strtotime(get_option('wpa_installed_date'));
$todayDate = time();
$installedDays = round(($todayDate - $installedDate) / (60 * 60 * 24));
$wpa_stats = json_decode(get_option('wpa_stats'),true);
$all_spam_blocked = $wpa_stats ? $wpa_stats['total']['all_time'] : 0;
if ($installedDays > 100 && $all_spam_blocked > 300 ){
echo '<div class="updated success" style="padding:10px; font-size:16px; line-height:1.6;color:#205225;">
Your support is vital for us to keep fighting spam. By supporting us on <a href="https://www.patreon.com/wp_armour" target="_blank">Patreon</a> with as little as USD 1, you will help us continue developing of <strong>WP Armour</strong> Anti Spam Plugin.
<ul style="padding-left:50px;list-style-type: square;">
<li><a href="https://www.patreon.com/wp_armour" target="_blank">WP Armour Patreon Page</a></li>
<li><a href="'.admin_url("admin.php?page=wp-armour&wpa_pateron_notice_hide=1").'">Hide this message</a></li>
</ul>
</div>';
}
}
}
// UPSELLING EXTENDED VERSION
if (get_option('wpa_extended_notice_hide') != 'yes' && !is_plugin_active('wp-armour-extended/wp-armour-extended.php') ){
$installedDate = strtotime(get_option('wpa_installed_date'));
$todayDate = time();
$installedDays = round(($todayDate - $installedDate) / (60 * 60 * 24));
$wpa_stats = json_decode(get_option('wpa_stats'),true);
$all_spam_blocked = $wpa_stats ? $wpa_stats['total']['all_time'] : 0;
if ($installedDays > 90 && $all_spam_blocked > 1000){
echo '<div class="updated success" style="padding:10px; font-size:16px; line-height:1.6;color:#205225;">
Hey, WP Armour has blocked <strong>'.$all_spam_blocked.'</strong> spam submissions till date - thats awesome!<br/><br/>
Can you help us by purchasing our Extended Version ? This will helps up maintain and support the plugin in upcoming days and make it even better. Our Extended version starts from 19.99 USD and comes with yearly license, No API calls & Fully GDPR Complaint. <br/><br/>
It has additional support including WooCommerce ( Blocks card testing orders), Ajax and Multi page Gravity Forms, Easy Digital Downloads, QuForm, MC4WP: Mailchimp for WordPress and have Spammer blocking based on IP, Record Spam Submission and many more.
<ul style="padding-left:50px;list-style-type: square;">
<li><a href="https://dineshkarki.com.np/buy-wp-armour-extended" target="_blank">I will help</a></li>
<li><a href="'.admin_url("admin.php?page=wp-armour&wpa_extended_notice_hide=1").'">Hide this message</a></li>
</ul>
</div>';
}
}
endif; // CAN MANAGE OPTION
}

View File

@@ -0,0 +1,87 @@
<?php if ( ! defined( 'ABSPATH' ) ) exit; ?>
<br/>
<table class="wp-list-table widefat">
<thead>
<tr>
<th colspan="2"><strong>General Settings</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td colspan="2"><strong>This plugin should work with default settings, however if you begin to get spam, update the field name below.</strong></td>
</tr>
<form method="post" action="">
<tr>
<td width="250">Honey Pot Field Name</td>
<td>
<input id="wpa_field_name" name="wpa_field_name" style="width:300px;" value="<?php echo esc_attr(get_option('wpa_field_name'));?>" type="text" readonly="readonly" />
<span class="dashicons dashicons-update" style="font-size: 28px; cursor: pointer;" onclick="wpa_unqiue_field_name()"></span>
<br/>
<em>Changing the field name regularly is a good idea. Please click on icon above to generate new field name.</em>
</td>
</tr>
<tr>
<td>Honey Pot Error Message</td>
<td>
<input name="wpa_error_message" style="width:300px;" value="<?php echo esc_attr(get_option('wpa_error_message'));?>" type="text" /><br/><em>Mesage for bots. No average human users will see though.</em>
</td>
</tr>
<tr>
<td>Disable Honeypot Test Widget</td>
<td>
<select name="wpa_disable_test_widget">
<option value="no" <?php echo get_option('wpa_disable_test_widget') == 'no'?'selected="selected"':''; ?> >No</option>
<option value="yes" <?php echo get_option('wpa_disable_test_widget') == 'yes'?'selected="selected"':''; ?> >Yes</option>
</select>
<em>Only visible when Admin user is logged in.</em>
</td>
</tr>
<tr>
<td>Disable jQuery?</td>
<td>
<select name="wpa_disable_jquery">
<option value="no" <?php echo get_option('wpa_disable_jquery') == 'no' ? 'selected="selected"' : ''; ?> >No</option>
<option value="yes" <?php echo get_option('wpa_disable_jquery') == 'yes' ? 'selected="selected"' : ''; ?> >Yes</option>
</select>
<em>⚠️ This is a new feature. Please test carefully before using on a live site.</em>
</td>
</tr>
<?php if (current_user_can('manage_options')) { ?>
<tr>
<td colspan="2">
<?php wp_nonce_field( 'wpa_save_settings', 'wpa_nonce' ); ?>
<input type="submit" name="submit-wpa-general-settings" class="button-primary" value="Save General Settings" />
</td>
</tr>
<?php } else { ?>
<tr>
<td colspan="2">
<p style="color: red;">Only Administrators can make changes to these settings.</p>
</td>
</tr>
<?php } ?>
</form>
</tbody>
</table><br/>
<script type="text/javascript">
function wpa_unqiue_field_name(){
var randomChars = 'abcdefghijklmnopqrstuvwxyz';
var length = 6;
var string = '';
for ( var i = 0; i < length; i++ ) {
string += randomChars.charAt(Math.floor(Math.random() * randomChars.length));
}
var number = Math.floor(1000 + Math.random() * 9000);
jQuery('#wpa_field_name').val(string+number);
}
</script>

View File

@@ -0,0 +1,53 @@
<?php if ( ! defined( 'ABSPATH' ) ) exit; ?>
<style type="text/css">
ul.uaf_list{ list-style-type:square;margin-left: 2em;}
.sidebar_image{max-width: 100%;}
</style>
<br/>
<?php if ( is_plugin_active( 'woocommerce/woocommerce.php' ) ) { ?>
<a href="https://hcn.im/routepricing" target="_blank"><img class="sidebar_image" src="<?php echo plugin_dir_url( dirname( __FILE__ ) ) . 'img/route_pricing.jpg'; ?>" /></a>
<br/><br/>
<?php } ?>
<table class="wp-list-table widefat fixed bookmarks">
<thead>
<tr>
<th><strong>Quick Link</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td>
<ul class="uaf_list">
<li><a href="https://wordpress.org/support/plugin/honeypot/" target="_blank">Support Forum</a></li>
<li><a href="https://www.facebook.com/Dnesscarkey-77553779916" target="_blank">Send Us Msg via Facebook</a></li>
<li><a href="https://dineshkarki.com.np/buy-wp-armour-extended" target="_blank">Get WP Armour Extended</a></li>
</ul>
</td>
</tr>
</tbody>
</table>
<br/>
<table class="wp-list-table widefat fixed bookmarks">
<thead>
<tr>
<th><strong>Plugins You May Like</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td>
<ul class="uaf_list">
<li><a href="https://wordpress.org/plugins/use-any-font/" target="_blank">Use Any Font</a></li>
<li><a href="https://dineshkarki.com.np/jquery-validation-for-gravity-forms" target="_blank">Jquery Validation For Gravity Form</a></li>
<li><a href="https://wordpress.org/extend/plugins/any-mobile-theme-switcher/" target="_blank">Any Mobile Theme Switcher</a></li>
<li><a href="https://wordpress.org/extend/plugins/jquery-validation-for-contact-form-7/" target="_blank">Jquery Validation For Contact Form 7</a></li>
<li><a href="https://wordpress.org/extend/plugins/block-specific-plugin-updates/" target="_blank">Block Specific Plugin Updates</a></li>
</ul>
</td>
</tr>
</tbody>
</table>
<br/>

View File

@@ -0,0 +1,67 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
$wpae_nonce = '&_wpnonce='.wp_create_nonce( 'wpae_action_nonce' );
if ( isset( $_GET['action'] ) && isset( $_GET['_wpnonce'] ) && wp_verify_nonce( $_GET['_wpnonce'], 'wpae_action_nonce' ) ) {
switch ($_GET['action']) {
case 'resetstats':
if (function_exists('wpae_reset_stats')){
wpae_reset_stats();
$actionReturn = array('status' => 'ok','body'=>'Stats Reset' );
}
break;
}
}
$currentStats = json_decode(get_option('wpa_stats'), true);
?>
<?php if (isset($actionReturn)):?>
<div class="updated <?php echo $actionReturn['status']; ?>" id="message"><p><?php echo $actionReturn['body']; ?></p></div>
<?php endif; ?>
<br/>
<?php if (function_exists('wpae_reset_stats')){ ?>
<div class="wpae_bulk_actions">
<a href="admin.php?page=wp-armour&tab=stats&action=resetstats<?php echo $wpae_nonce ?>" onclick="return confirm('Are you sure? This action is irreversible.')">Reset Stats</a>
</div>
<?php } ?>
<table class="wp-list-table widefat fixed bookmarks">
<?php
/*
<thead>
<tr>
<th colspan="5"><strong>Quick Stats</strong></th>
</tr>
</thead>
*/ ?>
<thead>
<tr>
<th><strong>Source</strong></th>
<th><strong>Today</strong></th>
<th><strong>This Week</strong></th>
<th><strong>This Month</strong></th>
<th><strong>All Time</strong></th>
</tr>
<thead>
<tbody>
<?php
if (!empty($currentStats)){
foreach ($currentStats as $source=>$statData): ?>
<tr>
<td><strong><?php echo ucfirst($source); ?></strong></td>
<td><?php echo @wpa_check_date($statData['today']['date'],'today')?$statData['today']['count']:'0'; ?></td>
<td><?php echo @wpa_check_date($statData['week']['date'],'week')?$statData['week']['count']:'0'; ?></td>
<td><?php echo @wpa_check_date($statData['month']['date'],'month')?$statData['month']['count']:'0'; ?></td>
<td><?php echo $statData['all_time']; ?></td>
</tr>
<?php endforeach;
} else { ?>
<tr><td colspan="5">No Record Found</td></tr>
<?php } ?>
</tbody>
</table><br/>
<br/>

View File

@@ -0,0 +1,28 @@
<?php if ( ! defined( 'ABSPATH' ) ) exit; ?>
<style type="text/css">
.wpa_stat_table{max-width: 100%;filter: blur(2px);-webkit-filter: blur(2px);}
.wpa_stat_table_holder{position: relative;}
.wpa_stat_overlay{position: absolute; z-index: 10; width: 80%; height: 80%;top: 10%; left: 10%;box-shadow: 0 0 25px 10px rgba(0,0,0,0.08); background: #fff; border-radius: 5px; text-align:center;}
.wpa_stat_overlay .wpa_stat_headline{font-size: 20px; margin-top: 20px; padding: 5px;}
.wpa_stat_overlay .wpa_stat_content{padding: 5px;}
.wpa_stat_button a{ padding: 5px 30px !important; }
</style>
<div class="wpa_stat_table_holder">
<img class="wpa_stat_table" src="<?php echo plugin_dir_url( dirname( __FILE__ ) ) . 'img/dashboard_stats.png'; ?>" />
<div class="wpa_stat_overlay">
<div class="wpa_stat_headline">
View all spam statistics from dashboard
</div>
<div class="wpa_stat_content">
<p>Enable stats widgets with WP Armour Extended.</p>
<p>Also, it can auto block spammer's IP and record what spammer are trying to submit.</p>
</div>
<div class="wpa_stat_button">
<a href="https://dineshkarki.com.np/buy-wp-armour-extended" target="_blank" class="button button-primary">Get WP Armour Extended</a>
</div>
</div>
</div>

View File

@@ -0,0 +1,6 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
$GLOBALS['wpa_version'] = '2.3.04';
$GLOBALS['wpa_field_name'] = get_option('wpa_field_name');
$GLOBALS['wpa_error_message'] = get_option('wpa_error_message');
$GLOBALS['wpa_disable_test_widget'] = get_option('wpa_disable_test_widget');

View File

@@ -0,0 +1,26 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
add_action("wp_dashboard_setup", "wpa_dashboard_widget");
function wpa_dashboard_widget()
{
//add_meta_box( 'wpa_dashboard_widget', 'WP Armour Anti Spam Statistics', 'wpa_dashboard_widget_function', 'dashboard', 'side', 'high');
if ( current_user_can('administrator') ) {
add_meta_box(
'wpa_dashboard_widget',
'WP Armour Anti Spam Statistics',
'wpa_dashboard_widget_function',
'dashboard',
'side',
'high'
);
}
}
function wpa_dashboard_widget_function(){
ob_start();
include('views/wpa_stats_widget.php');
$widget_content = ob_get_contents();
ob_end_clean ();
$widget_content = apply_filters( 'wpa_widget_content', $widget_content);
echo $widget_content;
}

View File

@@ -0,0 +1,169 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
function wpa_load_scripts(){
if( get_option('wpa_disable_jquery') === 'yes' ) {
wp_enqueue_script( 'wpascript', plugins_url( '/js/wpa_vanilla.js', __FILE__ ), array(), $GLOBALS['wpa_version'], true );
} else {
wp_enqueue_script( 'wpascript', plugins_url( '/js/wpa.js', __FILE__ ), array('jquery'), $GLOBALS['wpa_version'], true );
}
wp_add_inline_script( 'wpascript', 'wpa_field_info = '.json_encode(wpa_field_info()));
wp_enqueue_style( 'wpa-css', plugins_url( '/css/wpa.css', __FILE__ ), array(), $GLOBALS['wpa_version']);
}
function wpa_plugin_menu(){
add_menu_page( 'WP Armour', 'WP Armour', 'edit_pages', 'wp-armour', 'wpa_options','dashicons-shield');
}
function wpa_options(){
$wpa_tabs = array(
'settings' => array('name'=>'Settings','path'=>'wpa_settings.php'),
'stats' => array('name'=>'Statistics','path'=>'wpa_stats.php'),
'extended_version' => array('name'=>"What's in WP Armour Extended ?",'path'=>'wpa_extended_version.php')
);
$wpa_tabs = apply_filters( 'wpa_tabs_filter', $wpa_tabs);
include 'views/wpa_main.php';
}
function wpa_save_settings(){
if ( isset($_POST['wpa_nonce']) && wp_verify_nonce($_POST['wpa_nonce'], 'wpa_save_settings')) {
if (empty($_POST['wpa_field_name'])){
$return['status'] = 'error';
$return['body'] = "Honey Pot Field Name can't be empty";
} else {
update_option('wpa_field_name',sanitize_title_with_dashes($_POST['wpa_field_name']));
update_option('wpa_error_message',sanitize_text_field(stripslashes($_POST['wpa_error_message'])));
update_option('wpa_disable_test_widget',sanitize_text_field($_POST['wpa_disable_test_widget']));
update_option('wpa_disable_jquery', sanitize_text_field($_POST['wpa_disable_jquery']));
$GLOBALS['wpa_field_name'] = get_option('wpa_field_name');
$GLOBALS['wpa_error_message'] = get_option('wpa_error_message');
$return['status'] = 'ok';
$return['body'] = 'Settings Saved';
}
} else {
$return['status'] = 'error';
$return['body'] = 'Sorry, your nonce did not verify. Please try again.';
}
return $return;
}
function wpa_save_stats($wp_system, $data){
$currentStats = json_decode(get_option('wpa_stats'), true) ?? array();
$timeArray = array('today','week','month');
if (!array_key_exists($wp_system,$currentStats)){
$currentStats[$wp_system]['today']['count'] = 0;
$currentStats[$wp_system]['week']['count'] = 0;
$currentStats[$wp_system]['month']['count'] = 0;
$currentStats[$wp_system]['today']['date'] = date('Ymd');
$currentStats[$wp_system]['week']['date'] = date('Ymd');
$currentStats[$wp_system]['month']['date'] = date('Ymd');
}
foreach ($timeArray as $key => $time) {
if (wpa_check_date($currentStats['total'][$time]['date'],$time)){
$currentStats['total'][$time]['count'] += 1;
} else {
$currentStats['total'][$time]['count'] = 1;
}
if (wpa_check_date($currentStats[$wp_system][$time]['date'],$time)){
$currentStats[$wp_system][$time]['count'] += 1;
} else {
$currentStats[$wp_system][$time]['count'] = 1;
}
$currentStats['total'][$time]['date'] = date('Ymd');
$currentStats[$wp_system][$time]['date'] = date('Ymd');
}
$currentStats['total']['all_time'] += 1;
@$currentStats[$wp_system]['all_time'] += 1;
update_option('wpa_stats', json_encode($currentStats));
}
function wpa_check_date($timestamp, $comparision){
switch ($comparision) {
case 'today':
if (date('Ymd') == $timestamp){
return true;
} else {
return false;
}
break;
case 'week':
$firstWeekDay = date("Ymd", strtotime('monday this week'));
$lastWeekDay = date("Ymd", strtotime('sunday this week'));
if($timestamp >= $firstWeekDay && $timestamp <= $lastWeekDay) {
return true;
} else {
return false;
}
break;
case 'month':
if(date('Ym',strtotime($timestamp)) == date('Ym')) {
return true;
} else {
return false;
}
break;
}
}
function wpa_unqiue_field_name(){
$permitted_chars = 'abcdefghijklmnopqrstuvwxyz';
return substr(str_shuffle($permitted_chars), 0, 6).rand(1,9999);
}
function wpa_unqiue_field_value(){
/* DEPRECATED LEVEL 2
if (function_exists('wpae_unqiue_field_value')){ // IF EXTENDED VERSION AVAILABLE
return wpae_unqiue_field_value();
} else {
return rand(1111, 999999);
}*/
return rand(1111, 999999);
}
function wpa_check_is_spam($form_data){
if (
(isset($form_data[$GLOBALS['wpa_field_name']])) &&
(isset($form_data['alt_s'])) &&
(empty($form_data['alt_s']))
){
/* DEPRECATED LEVEL 2
if (function_exists('wpae_2level_spam_check')){
return wpae_2level_spam_check($form_data[$GLOBALS['wpa_field_name']]);
} else {
return false; // FALSE MEANS NOT SPAM
}*/
return false; // FALSE MEANS NOT SPAM
} else {
return true; // TRUE MEANS SPAM
}
}
function wpa_field_info(){
if (current_user_can('activate_plugins') && (get_option('wpa_disable_test_widget') != 'yes')){
$wpa_add_test = 'yes';
} else {
$wpa_add_test = 'no';
}
$return = array(
'wpa_field_name' => $GLOBALS['wpa_field_name'],
'wpa_field_value' => wpa_unqiue_field_value(),
'wpa_add_test' => $wpa_add_test
);
return $return;
}

View File

@@ -0,0 +1,442 @@
=== WP Armour - Honeypot Anti Spam ===
Contributors: dnesscarkey
Donate link: https://www.patreon.com/wp_armour
Tags: anti spam, spam protection, comment spam , contact form spam, akismet
Requires at least: 5.0
Tested up to: 6.8.3
Stable tag: 2.3.04
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Fastest growing Anti Spam plugin. No API calls, subscriptions, captcha or puzzle. Full GDPR complaint. For comments, contact form, login, registration
== Description ==
This plugins block spam submissions using honeypot anti spam technic. No Captcha or extra verification field hassle to the users. Only lets spam bots to suffer using our anti spam filter.
<strong>Automatic anti spam protection for following forms (Available in Free Version) . No setup required.</strong>
* WP Comments
* WP Registraton
* BBPress Forum (<a href="https://bbpress.org">bbpress.org</a>)
* Contact Form 7 (<a href="https://wordpress.org/plugins/contact-form-7">wordpress.org/plugins/contact-form-7</a>)
* Gravity Forms (For Non Ajax and Single Page/Step Form - <a href="https://www.gravityforms.com">gravityforms.com</a>)
* WPForms (<a href="https://wpforms.com">wpforms.com</a>)
* Formidable Forms (<a href="https://formidableforms.com">formidableforms.com</a>)
* Caldera Forms (<a href="https://calderaforms.com">calderaforms.com</a>)
* Toolset Forms (<a href="https://toolset.com">toolset.com</a>)
* Elementor Forms (<a href="https://elementor.com">elementor.com</a>)
* Fluent Forms (<a href="https://fluentforms.com">fluentforms.com</a>)
* Divi Theme Contact Form (<a href="https://www.elegantthemes.com">elegantthemes.com</a>)
* Theme My Login ( https://wordpress.org/plugins/theme-my-login/ )
* WooCommerce Reviews Pro
* GDPR compliant. No tracking, cookie storage or external server calls.
<strong>WP Armour Extended (Paid Version) supports additional anti spam protection and features.</strong>
* Record Spam Submission, view what spam bot are trying to submit
* Logs spam bot IPs.
* Block spam bot IPs if multiple spam is submitted. Add extra level of anti spam filter based on IPs. Stops spam bot from using unwanted bandwidth and save valuable server resource.
* WooCommerce Checkout & Registration including Card Testing Orders (<a href="https://woocommerce.com">woocommerce.com</a>)
* Easy Digital Downloads Checkout and Registration (<a href="https://easydigitaldownloads.com">easydigitaldownloads.com</a>)
* QuForm Contact Form (<a href="https://www.quform.com">quform.com</a>)
* Ninja Forms (<a href="https://ninjaforms.com">https://ninjaforms.com</a>)
* Gravity Forms (For Ajax Based and Multi Step Forms - <a href="https://www.gravityforms.com">gravityforms.com</a>)
* MC4WP: Mailchimp for WordPress (<a href="https://www.mc4wp.com">mc4wp.com</a>)
* S2 Members (<a href="https://s2member.com">s2member.com</a>)
* Ulimate Members (<a href="https://ultimatemember.com/">ultimatemember.com</a>)
* Bricks Builder Form (<a href="https://bricksbuilder.io/">bricksbuilder.io</a>)
* BricksForge Pro Form (<a href="https://bricksforge.io/">bricksforge.io</a>)
* Beaver Builder Contact Form Module (<a href="https://www.wpbeaverbuilder.com/">Beaver Builder</a>)
* Strong Testimonials (<a href="https://wordpress.org/plugins/strong-testimonials/">wordpress.org/plugins/strong-testimonials</a>)
* Formcraft Form (<a href="https://formcraft-wp.com/">formcraft-wp.com</a>)
* Forminator Form (<a href="https://wordpress.org/plugins/forminator/">wordpress.org/plugins/forminator</a>)
* WS Form (<a href="https://wordpress.org/plugins/ws-form/">wordpress.org/plugins/ws-form</a>)
* YITH Easy Login & Register Popup for WooCommerce
* UsersWP (<a href="https://wordpress.org/plugins/userswp/">wordpress.org/plugins/userswp</a>)
* Youzify (<a href="https://youzify.com/">youzify.com/</a>)
* MailPoet (<a href="https://wordpress.org/plugins/mailpoet/">wordpress.org/plugins/mailpoet</a>)
* Brevo - SendInBlue (<a href="https://wordpress.org/plugins/mailin/">wordpress.org/plugins/mailin</a>)
* JetForm Builder (<a href="https://jetformbuilder.com/">jetformbuilder.com</a>)
* HTMLform plugin (<a href="https://www.htmlformsplugin.com">htmlformsplugin.com</a>)
* Avia Enfold Theme (<a href="https://kriesi.at/themes/enfold">kriesi.at/themes/enfold</a>)
* BuddyPress (<a href="https://buddypress.org">buddypress.org</a>)
* BuddyBoss (<a href="https://www.buddyboss.com">buddyboss.com</a>)
* Sure Forms (<a href="https://wordpress.org/plugins/sureforms/">wordpress.org/plugins/sureforms</a>)
* Everest Forms (<a href="https://wordpress.org/plugins/everest-forms/">wordpress.org/plugins/everest-forms</a>)
You can get the WP Armour - Anti Spam Extended from <a title="WP Armour Extended - Anti Spam" href="https://dineshkarki.com.np/buy-wp-armour-extended">here</a>
<strong>How our plugin is different than other honeypot anti spam plugins ? </strong>
* Works for most of the forms and wordpress system including registation and comments. So All in one anti spam solution.
* No external API calls like Akismet or CleanTalk for spam filtering.
* GDPR Compliant.
* Spam bots can't use javascript so we use javascript to insert honeypot anti spam field in the form and spam bots can't fill it to pass anti spam test.
* Unique honeypot field name generated for each wordpress installation, so it is hard for spam bots to make one fit for all solution to bypass honeypot anti spam test.
* No setup required. Just activate the plugin and it enables anti spam for all supported forms, comment and registration.
* No API or monthly subscription needed like other plugins. Though we have <a title="WP Armour Extended - Anti Spam" href="https://dineshkarki.com.np/buy-wp-armour-extended">Premium extended version</a> of the plugin for more support with yearly license.
<strong>Support</strong>
If you have any issue, you can write to using <a title="WP Armour - Honeypot Anti Spam Forum" href="https://wordpress.org/support/plugin/honeypot/" target="_blank">support forum.</a>
<strong>Need distance-based delivery fees in WooCommerce?</strong>
Calculate accurate shipping costs automatically with <a href="https://hcn.im/routepricing" target="_blank">RoutePricing</a>.
Uses Google Maps to set dynamic prices per km/mi — perfect for restaurants, local shops, and delivery businesses.
<strong>Support Us at Patreon</strong>
Your support is vital for us to keep fighting spam. By supporting us on <a href="https://www.patreon.com/wp_armour" target="_blank">Patreon</a> with as little as USD 1, you will help us continue developing of our anti spam plugin.
<strong>Our other plugins</strong>
* <a target="_blank" href="http://wordpress.org/plugins/use-any-font">Use Any Font</a>
* <a target="_blank" href="http://wordpress.org/plugins/jquery-validation-for-contact-form-7/">Jquery Validation For Contact Form 7</a>
* <a target="_blank" href="https://dineshkarki.com.np/jquery-validation-for-gravity-forms">Jquery Validation For Gravity Forms</a>
* <a target="_blank" href="http://wordpress.org/plugins/block-specific-plugin-updates/">Block Specific Plugin Updates</a>
== Installation ==
1. You can install plugin directly from Wordpress Plugin menu. Search for WP Armour - Honeypot Anti Spam plugin and click on Install OR you can download the plugin and install honeypot.zip from Upload Plugin button from Wordpress Plugin menu.
2. You can also access the settings from WP Armour menu. From there you can change honeypot anti spam field name and honeypot spam submission message.
3. Please check your forms, comments, bbpress, registration to confirm they are working after honeypot is placed. There will be widgets below the forms to confirm anti spam protection is enabled and ready to block spam.
== Frequently Asked Questions ==
= How this plugin is different than other honeypot anti spam plugins ? =
We have used the honeypot technic differently in this plugin to make it work better. What other plugin does is, they add honeypot anti spam field from server side (PHP) and check if the spam bot have filled or not. If it is filled it is marked as spam. But in our case, we add honeypot anti spam field from client side (Javascript) and check if honeypot field exists or not. Spam bots can't use javascript and honeypot field is not available for them. This way we can better trap spam bot.
= Will it block all the spam submission ? =
Spam submission are either created by spam bot or by manual submission from users. Honeypot trap is for spam bots only. So there won't be submission from spam bots. So you get rid of around 98% of spam. And ya, it can block russian spam, chinese spam effectively.
= How can i verify that honeypot anti spam protection is enabled ? =
Honeypot Anti Spam is a trap for spam bots, so it is not visible for users. However, if you are logged in as Administrator, WP Armour Test widget is shown below the form. This will confirm Honeypot anti spam checker is active in that form. And also allows you to test it as spam bot.
= Do i need Captcha verification ? =
No, with this plugin you don't need Captcha, reCaptcha or Invisble Captcha at all. Lets avoid hassle for common users. Just activate the plugin and for all supported forms, anti spam filter is enabled automatically.
= I am already using reCaptcha but still getting spam. Can this plugin stop spammers ? =
Yes. Spam bots are now able to solve the captcha puzzle. So they are no longer effective as anti spam checker . Our plugin's javascript based anti spam filter can block them as spam bots can't use javascript.
= I see settings to change honeypot anti spam field name. Do i need to change it ? =
By default our plugin generates unqiue honeypot anti spam field name so that the slim chance of spam bots using the field to submit spam is more slimmer. This blocks them to create one for all type solution to bypass the honeypot field. But even in that case if you get spam bot submission, chaging the field name should work.
= Can i see what data spammers are trying to submit ? =
With WP Armour - Honeypot Anti Spam plugin it is No. But if you want you can use <a title="WP Armour Extended - Anti Spam" href="https://dineshkarki.com.np/buy-wp-armour-extended">WP Armour Extended</a> and can see what data spammers are trying to submit. It also have feature to block ip address if there are multiple submission from same IP and adds extra layer of spam protection.
== Screenshots ==
1. Screenshot #1. WP Armour - Honeypot Anti Spam Settings
1. Screenshot #2. WP Armour - Honeypot Anti Spam Statistics
1. Screenshot #3. Honeypot for Contact Form 7 ( anti spam for contact form 7 )
1. Screenshot #4. Honeypot for Formidable Forms ( anti spam for formidable forms)
1. Screenshot #5. Honeypot for Gravity Forms ( anti spam for gravity forms )
1. Screenshot #6. Honeypot for BBpress Wordpress Forum ( anti spam for bbpress forums )
1. Screenshot #7. Honeypot for Comment ( anti spam for comments )
1. Screenshot #8. Honeypot for WPForms ( anti spam for WPForms )
1. Screenshot #9. Honeypot for Caldera Forms ( anti spam for caldera forms)
1. Screenshot #10. Honeypot for Divi Contact Forms ( anti spam for Divi contact forms )
1. Screenshot #11. Anti Spam for WooCommerce Checkout (Available in Extended version)
1. Screenshot #11. Anti Spam for Fluent Forms
== Changelog ==
= = 2.3.04 =
* Changes in Honeypot field
= = 2.3.03 =
* Sidebar Update
= = 2.3.02 =
* Fixed the login issue. We are really sorry for the trouble it has occured.
= = 2.3.01 =
* Divi Form Issue Fixed
= = 2.3 =
* Option to disable Jquery Usage.
= = 2.2.14 =
* Comment Form Fixes
= = 2.2.13 =
* Fixes for Ultimate Memebership form
* Remove widgets for Non administrator.
= = 2.2.12 =
* Registration and Login support for User Registration & Membership
= = 2.2.11 =
* Fixed Forgot Password issue for TutorLMS.
= = 2.2.10 =
* Fixed Forgot Password issue.
= = 2.2.09 =
* Fixed Admin password reset issue.
= = 2.2.08 =
* WP Armour Anti Spam Statistics available for Editor role.
* Filter by Forms and IP search available in WP Armour Extended version
= = 2.2.07 =
* Added support for Elementor Login Form
* Anti spam support for Lost Password ( Reset Password )
= = 2.2.06 =
* Fixed Divi Notice Issue.
= = 2.2.05 =
* Fixed WooCommerce issue that came after 2.2.04 update.
= = 2.2.04 =
* Code Optimization
* Fix multiple span check widgets being shown for some forms.
= = 2.2.03 =
* Gravity Form Error Fixed.
* Learnpress error fixes.
= = 2.2.02 =
* All integrations disbale/enable option added in Extended version.
= = 2.2.01 =
* Removed Level 2 anti spam check as it is no more needed.
= = 2.1.23 =
* Issue fixed for Contact Form 7.
= = 2.1.22 =
* Fixed admin url path issues.
= = 2.1.21 =
* Fixed multiple test widget issue.
= = 2.1.20 =
* Fixes for Easy Digital Downloads reviews (EDD Reviews).
* Fixed issues related to current stats being empty.
= = 2.1.19 =
* Fixes for Toolset forms.
= = 2.1.18 =
* Roll back of version 2.1.17 as it created more issues for Elementor Forms.
= = 2.1.17 =
* Fixed Elementor Admin Form Submission issue.
= = 2.1.16 =
* Fixed comment form isuse for few themes.
= = 2.1.15 =
* Fixes for Toolset Registration Form
= = 2.1.14 =
* Fixed XSS vulnerabilities issue for Divi
= = 2.1.13 =
* Fixed field visible isssue.
* Fixed login issue to UserWP
= = 2.1.12 =
* Fixed login submission issue.
= = 2.1.11 =
* Fixed Divi Submission issue when field has special characters.
= = 2.1.10 =
* Fixed Divi Submission issue
= = 2.1.9 =
* Fixed Autocomplete issue
= = 2.1.8 =
* Hidden Field Css issue fixed.
= = 2.1.7 =
* Added extra spam check
= = 2.1.6 =
* Fix Contact Form 7 issue when validation error occurs.
= = 2.1.5 =
* Fluent Form deprecated hooks update.
= = 2.1.4 =
* Fixed cart issue when using custom form.
= = 2.1.3 =
* Fixed WCAG compatibility
= = 2.1.2 =
* Fixed login recording issue.
= = 2.1.1 =
* Fixed WP Form submission data issue.
= = 2.1 =
* Added support for Divi Engine Form
= = 2.0.2 =
* Added support for Beaver Builder Theme's comment form.
= = 2.0.1 =
* Fixed error message due to removal of ajax call.
= = 2.0 =
* Fixed false notification message regarding version conflict.
= = 1.10 =
* Fixed Popup Form issue
* Removed wpa_field_info Ajax call
= = 1.9.2 =
* Fixed Astra Theme Comment Issue
= = 1.9.1 =
* Removed alert msg error.
= = 1.9 =
* Removed inline javascript for better performance.
= = 1.8.5 =
* Added support for WooCommerce Reviews Pro.
* Added support for Fluent Form Conversional Forms.
* Better Protection against WooCommerce Fake Credit Card Test Orders
= = 1.8.4 =
* removed complicated spam checker as it was creating issue for some users.
= = 1.8.3 =
* Fixed false spam issue for some users.
= = 1.8.2 =
* Added extra security check
= = 1.8.1 =
* Fixed session issue.
= = 1.8 =
* Added dynamic value for honeypot field test for more powerfull spam blocker.
= = 1.7.2 =
* Added random field name generate button
* Fixed stats issue.
= = 1.7.1 =
* Fixed Test Widget not showing issue
* Fixed stats issue.
= = 1.7 =
* Fixed Hide Notification issue.
* Tested with 5.7.
= = 1.6 =
* Removed WooCommerce Support from Lite version due to complications.
* Added option to disable Wp Armour Anti Spam Widget.
= = 1.5.9 =
* Removed WooCommerce checkout spam protection.
= = 1.5.8 =
* Fixed Extended verion save settings.
= = 1.5.7 =
* Fixed security issue.
= = 1.5.6 =
* Fixed Gravity Form Ajax Issue
* Added anti spam protection for Elementor Form Widget
* Added anti spam protection for Fluent Forms.
= = 1.5.5 =
* Added anti spam protection for woocommerce.
* Added anti spam protection for divi contact form.
= = 1.5.4 =
* Added anti spam statictic in Dashboard for Extended version users.
= = 1.5.3 =
* Added anti spam support for Toolset Forms.
* Fixed Caldera Forms anti spam message issue in Admin.
= = 1.5.2 =
* Removed anti spam filter from admin comment section. Before it was marking the comment as spam when trying to add from admin panel.
= = 1.5.1 =
* Added honeypot anti spam support for Caldera Forms.
= = 1.5 =
* WP Armour Test Panel added in forms to confirm spam protection is enabled. Only visible for Admin.
= = 1.4 =
* Added honeypot anti spam for Formidable Forms
* Added honeypot anti spam statistics
= = 1.3 =
* Rebranding to WP Armour - Honeypot Anti Spam Plugin.
= = 1.1 =
* Removed unwanted settings.
= = 1.0 =
* First Release
* Added anti spam honeypot for contact form 7
* Added anti spam honeypot for gravity forms

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

View File

@@ -0,0 +1,53 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
/*
Plugin Name: WP Armour - Honeypot Anti Spam
Plugin URI: http://wordpress.org/plugins/honeypot/
Description: Add honeypot anti spam protection.
Author: Dnesscarkey
Version: 2.3.04
Author URI: https://dineshkarki.com.np/wp-armour-anti-spam
*/
include 'includes/wpa_config.php';
include 'includes/wpa_functions.php';
include 'includes/wpa_dashboard_widget.php';
include 'includes/views/wpa_notice.php';
add_action( 'init', function(){
if( !is_admin() ){ // ONLY BLOCK SPAM IF IT IS NOT ADMIN PANEL
include 'includes/integration/wpa_bbpress.php';
include 'includes/integration/wpa_wpcomment.php';
include 'includes/integration/wpa_wpregistration.php';
include 'includes/integration/wpa_contactform7.php';
include 'includes/integration/wpa_gravityforms.php';
include 'includes/integration/wpa_formidable.php';
include 'includes/integration/wpa_calderaforms.php';
include 'includes/integration/wpa_toolsetform.php';
include 'includes/integration/wpa_diviform.php';
}
include 'includes/integration/wpa_elementor.php';
include 'includes/integration/wpa_fluentform.php';
include 'includes/integration/wpa_diviengineform.php';
include 'includes/integration/wpa_wplogin.php';
include 'includes/integration/wpa_wpforms.php';
});
add_action('wp_enqueue_scripts','wpa_load_scripts');
add_action('login_enqueue_scripts','wpa_load_scripts');
add_action('admin_menu', 'wpa_plugin_menu');
add_action('wpa_handle_spammers','wpa_save_stats',10,2);
register_activation_hook( __FILE__, 'wpa_plugin_activation' );
function wpa_plugin_activation(){
add_option('wpa_installed_date',date('Ymd'));
add_option('wpa_field_name',wpa_unqiue_field_name());
add_option('wpa_error_message',' Spamming or your Javascript is disabled !!');
add_option('wpa_disable_test_widget','no');
add_option('wpa_disable_jquery', 'no');
add_option('wpa_stats','{"total":{"today":{"date":"'.date('Ymd').'","count":0},"week":{"date":"'.date('Ymd').'","count":0},"month":{"date":"'.date('Ymd').'","count":0},"all_time":0}}');
}