first commit

This commit is contained in:
2024-11-10 21:08:49 +01:00
commit 0d932ce5ee
14455 changed files with 2567501 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
<?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,44 @@
<?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($_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="?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,72 @@
<?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_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>';
}
}
// 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['total']['all_time'];
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="?wpa_reviews_notice_hide=1">I already did</a></li>
<li><a href="?wpa_reviews_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['total']['all_time'];
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 lifetime license (No monhtly or yearly recurring) and No API calls. <br/><br/>
Also, it has 2 level spam check and additionally works with WooCommerce, 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 so on.
<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="?wpa_extended_notice_hide=1">Hide this message</a></li>
</ul>
</div>';
}
}
}

View File

@@ -0,0 +1,67 @@
<?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 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>
</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,49 @@
<?php if ( ! defined( 'ABSPATH' ) ) exit; ?>
<style type="text/css">
ul.uaf_list{ list-style-type:square;margin-left: 2em;}
</style>
<br/>
<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="http://wordpress.org/extend/plugins/any-mobile-theme-switcher/" target="_blank">Any Mobile Theme Switcher</a></li>
<li><a href="http://wordpress.org/extend/plugins/jquery-validation-for-contact-form-7/" target="_blank">Jquery Validation For Contact Form 7</a></li>
<li><a href="http://wordpress.org/extend/plugins/add-tags-and-category-to-page/" target="_blank">Add Tags And Category To Page</a></li>
<li><a href="http://wordpress.org/extend/plugins/block-specific-plugin-updates/" target="_blank">Block Specific Plugin Updates</a></li>
<li><a href="http://wordpress.org/extend/plugins/featured-image-in-rss-feed/" target="_blank">Featured Image In RSS Feed</a></li>
<li><a href="http://wordpress.org/extend/plugins/remove-admin-bar-for-client/" target="_blank">Remove Admin Bar</a></li>
</ul>
</td>
</tr>
</tbody>
</table>
<br/>

View File

@@ -0,0 +1,93 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
$currentStats = json_decode(get_option('wpa_stats'), true);
?>
<br/>
<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/>
<?php /*
<table class="wp-list-table widefat fixed bookmarks">
<thead>
<tr>
<th colspan="2"><strong>Visualization </strong></th>
</tr>
</thead>
<tbody>
<tr>
<td colspan="2">
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript">
google.charts.load('current', {'packages':['bar']});
google.charts.setOnLoadCallback(drawChart);
function drawChart() {
var data = google.visualization.arrayToDataTable([
['Source', 'Today', 'This Week','This Month', 'All Time'],
<?php foreach ($currentStats as $source=>$statData): ?>
[
'<?php echo ucfirst($source); ?>',
<?php echo wpa_check_date($todayDate,'today')?$statData['today']['count']:'0'; ?>,
<?php echo wpa_check_date($weekDate,'week')?$statData['week']['count']:'0'; ?>,
<?php echo wpa_check_date($monthDate,'month')?$statData['month']['count']:'0'; ?>,
<?php echo $statData['all_time']; ?>
],
<?php endforeach;?>
]);
var options = {
chart: {
title: 'Spam blocked by WP Armour',
hAxis: {title: 'Source', titleTextStyle: {color: 'red'}},
},
colors:['#bedcf5','#75b5e9','#2c8ddd','#19609b']
};
var chart = new google.charts.Bar(document.getElementById('wpae_chart_div'));
chart.draw(data, google.charts.Bar.convertOptions(options));
}
</script>
<div id="wpae_chart_div" style="width:100%; height:400px; margin-top:15px; margin-bottom:10px;">
</div>
</td>
</tr>
</tbody>
</table><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>