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,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>