Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
davidegiunchidiennea authored Aug 21, 2019
2 parents 363b58b + 6ed0552 commit daba281
Show file tree
Hide file tree
Showing 34 changed files with 5,756 additions and 6,529 deletions.
8 changes: 0 additions & 8 deletions all-in-one-wp-security/admin/wp-security-admin-init.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ class AIOWPSecurity_Admin_Init
var $user_registration_menu;
var $db_security_menu;
var $filesystem_menu;
var $whois_menu;
var $blacklist_menu;
var $firewall_menu;
var $brute_force_menu;
Expand Down Expand Up @@ -300,7 +299,6 @@ function create_admin_menus()
}else{
add_submenu_page(AIOWPSEC_MAIN_MENU_SLUG, __('Filesystem Security', 'all-in-one-wp-security-and-firewall'), __('Filesystem Security', 'all-in-one-wp-security-and-firewall') , AIOWPSEC_MANAGEMENT_PERMISSION, AIOWPSEC_FILESYSTEM_MENU_SLUG, array(&$this, 'handle_filesystem_menu_rendering'));
}
add_submenu_page(AIOWPSEC_MAIN_MENU_SLUG, __('WHOIS Lookup', 'all-in-one-wp-security-and-firewall'), __('WHOIS Lookup', 'all-in-one-wp-security-and-firewall') , AIOWPSEC_MANAGEMENT_PERMISSION, AIOWPSEC_WHOIS_MENU_SLUG, array(&$this, 'handle_whois_menu_rendering'));
if (AIOWPSecurity_Utility::is_multisite_install() && get_current_blog_id() != 1){
//Suppress the Blacklist Manager menu if site is a multi site AND not the main site
}else{
Expand Down Expand Up @@ -366,12 +364,6 @@ function handle_filesystem_menu_rendering()
$this->filesystem_menu = new AIOWPSecurity_Filesystem_Menu();
}

function handle_whois_menu_rendering()
{
include_once('wp-security-whois-menu.php');
$this->whois_menu = new AIOWPSecurity_WhoIs_Menu();
}

function handle_blacklist_menu_rendering()
{
include_once('wp-security-blacklist-menu.php');
Expand Down
4 changes: 2 additions & 2 deletions all-in-one-wp-security/admin/wp-security-blacklist-menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ function render_tab1()
</div>
<div class="aio_grey_box">
<?php
$addon_link = '<strong><a href="http://www.site-scanners.com/country-blocking-addon/" target="_blank">Country Blocking Addon</a></strong>';
$addon_link = '<strong><a href="http://www.site-scanners.com/country-blocking-addon/" target="_blank">'.__('Country Blocking Addon', 'all-in-one-wp-security-and-firewall').'</a></strong>';
$info_msg = sprintf( __('You may also be interested in our %s.', 'all-in-one-wp-security-and-firewall'), $addon_link);
$info_msg2 = __('This addon allows you to automatically block IP addresses based on their country of origin.', 'all-in-one-wp-security-and-firewall');

Expand All @@ -177,7 +177,7 @@ function render_tab1()
<div class="aio_orange_box">
<p>
<?php
$read_link = '<a href="https://www.tipsandtricks-hq.com/wordpress-security-and-firewall-plugin#advanced_features_note" target="_blank">must read this message</a>';
$read_link = '<a href="https://www.tipsandtricks-hq.com/wordpress-security-and-firewall-plugin#advanced_features_note" target="_blank">'.__('must read this message', 'all-in-one-wp-security-and-firewall').'</a>';
echo sprintf(__('This feature can lock you out of admin if it doesn\'t work correctly on your site. You %s before activating this feature.', 'all-in-one-wp-security-and-firewall'), $read_link);
?>
</p>
Expand Down
18 changes: 9 additions & 9 deletions all-in-one-wp-security/admin/wp-security-brute-force-menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ function render_tab1()
?>
<div class="aio_blue_box">
<?php
$cookie_based_feature_url = '<a href="admin.php?page='.AIOWPSEC_BRUTE_FORCE_MENU_SLUG.'&tab=tab2" target="_blank">Cookie Based Brute Force Prevention</a>';
$white_list_feature_url = '<a href="admin.php?page='.AIOWPSEC_BRUTE_FORCE_MENU_SLUG.'&tab=tab4" target="_blank">Login Page White List</a>';
$cookie_based_feature_url = '<a href="admin.php?page='.AIOWPSEC_BRUTE_FORCE_MENU_SLUG.'&tab=tab2" target="_blank">'.__('Cookie Based Brute Force Prevention', 'all-in-one-wp-security-and-firewall').'</a>';
$white_list_feature_url = '<a href="admin.php?page='.AIOWPSEC_BRUTE_FORCE_MENU_SLUG.'&tab=tab4" target="_blank">'.__('Login Page White List', 'all-in-one-wp-security-and-firewall').'</a>';
echo '<p>'.__('An effective Brute Force prevention technique is to change the default WordPress login page URL.', 'all-in-one-wp-security-and-firewall').'</p>'.
'<p>'.__('Normally if you wanted to login to WordPress you would type your site\'s home URL followed by wp-login.php.', 'all-in-one-wp-security-and-firewall').'</p>'.
'<p>'.__('This feature allows you to change the login URL by setting your own slug and renaming the last portion of the login URL which contains the <strong>wp-login.php</strong> to any string that you like.', 'all-in-one-wp-security-and-firewall').'</p>'.
Expand Down Expand Up @@ -205,7 +205,7 @@ function render_tab1()
<?php wp_nonce_field('aiowpsec-rename-login-page-nonce'); ?>
<div class="aio_orange_box">
<?php
$read_link = '<a href="https://www.tipsandtricks-hq.com/wordpress-security-and-firewall-plugin#advanced_features_note" target="_blank">must read this message</a>';
$read_link = '<a href="https://www.tipsandtricks-hq.com/wordpress-security-and-firewall-plugin#advanced_features_note" target="_blank">'.__('must read this message', 'all-in-one-wp-security-and-firewall').'</a>';
echo '<p>'.sprintf(__('This feature can lock you out of admin if it doesn\'t work correctly on your site. You %s before activating this feature.', 'all-in-one-wp-security-and-firewall'), $read_link).'</p>';
echo '<p>'.__("NOTE: If you are hosting your site on WPEngine or a provider which performs server caching, you will need to ask the host support people to NOT cache your renamed login page.", "all-in-one-wp-security-and-firewall").'</p>';
?>
Expand Down Expand Up @@ -340,12 +340,12 @@ function render_tab2()
</div>
<div class="aio_yellow_box">
<?php
$backup_tab_link = '<a href="admin.php?page='.AIOWPSEC_SETTINGS_MENU_SLUG.'&tab=tab2" target="_blank">backup</a>';
$video_link = '<a href="https://www.tipsandtricks-hq.com/all-in-one-wp-security-plugin-cookie-based-brute-force-login-attack-prevention-feature-5994" target="_blank">video tutorial</a>';
$backup_tab_link = '<a href="admin.php?page='.AIOWPSEC_SETTINGS_MENU_SLUG.'&tab=tab2" target="_blank">'.__('backup', 'all-in-one-wp-security-and-firewall').'</a>';
$video_link = '<a href="https://www.tipsandtricks-hq.com/all-in-one-wp-security-plugin-cookie-based-brute-force-login-attack-prevention-feature-5994" target="_blank">'.__('video tutorial', 'all-in-one-wp-security-and-firewall').'</a>';
$info_msg = sprintf( __('Even though this feature should not have any impact on your site\'s general functionality <strong>you are strongly encouraged to take a %s of your .htaccess file before proceeding</strong>.', 'all-in-one-wp-security-and-firewall'), $backup_tab_link);
$info_msg1 = __('If this feature is not used correctly, you can get locked out of your site. A backed up .htaccess file will come in handy if that happens.', 'all-in-one-wp-security-and-firewall');
$info_msg2 = sprintf( __('To learn more about how to use this feature please watch the following %s.', 'all-in-one-wp-security-and-firewall'), $video_link);
$brute_force_login_feature_link = '<a href="admin.php?page='.AIOWPSEC_FIREWALL_MENU_SLUG.'&tab=tab4" target="_blank">Cookie-Based Brute Force Login Prevention</a>';
$brute_force_login_feature_link = '<a href="admin.php?page='.AIOWPSEC_FIREWALL_MENU_SLUG.'&tab=tab4" target="_blank">'.__('Cookie-Based Brute Force Login Prevention', 'all-in-one-wp-security-and-firewall').'</a>';
echo '<p>'.$info_msg.
'<br />'.$info_msg1.
'<br />'.$info_msg2.'</p>';
Expand Down Expand Up @@ -376,7 +376,7 @@ function render_tab2()
<?php wp_nonce_field('aiowpsec-enable-cookie-based-brute-force-prevention'); ?>
<div class="aio_orange_box">
<p>
<?php _e('This feature can lock you out of admin if it doesn\'t work correctly on your site. You <a href="https://www.tipsandtricks-hq.com/wordpress-security-and-firewall-plugin#advanced_features_note" target="_blank">must read this message</a> before activating this feature.', 'all-in-one-wp-security-and-firewall'); ?>
<?php _e('This feature can lock you out of admin if it doesn\'t work correctly on your site. You <a href="https://www.tipsandtricks-hq.com/wordpress-security-and-firewall-plugin#advanced_features_note" target="_blank">'.__('must read this message', 'all-in-one-wp-security-and-firewall').'</a> before activating this feature.', 'all-in-one-wp-security-and-firewall'); ?>
</p>
</div>
<table class="form-table">
Expand Down Expand Up @@ -572,7 +572,7 @@ function render_tab3()
<div class="aio_orange_box">
<p>
<?php
echo __('By enabling these settings the Google reCAPTCHA v2 widget will be applied by default for all forms in the captcha settings below.', 'all-in-one-wp-security-and-firewall');
echo __('By enabling these settings the Google reCAPTCHA v2 widget will be applied by default for all forms with captcha enabled.', 'all-in-one-wp-security-and-firewall');
?>
</p>
</div>
Expand Down Expand Up @@ -780,7 +780,7 @@ function render_tab4()
<div class="aio_yellow_box">
<?php
$brute_force_login_feature_link = '<a href="admin.php?page='.AIOWPSEC_BRUTE_FORCE_MENU_SLUG.'&tab=tab2" target="_blank">Cookie-Based Brute Force Login Prevention</a>';
$rename_login_feature_link = '<a href="admin.php?page='.AIOWPSEC_BRUTE_FORCE_MENU_SLUG.'&tab=tab1" target="_blank">Rename Login Page</a>';
$rename_login_feature_link = '<a href="admin.php?page='.AIOWPSEC_BRUTE_FORCE_MENU_SLUG.'&tab=tab1" target="_blank">'.__('Rename Login Page', 'all-in-one-wp-security-and-firewall').'</a>';
echo '<p>'.sprintf( __('Attention: If in addition to enabling the white list feature, you also have one of the %s or %s features enabled, <strong>you will still need to use your secret word or special slug in the URL when trying to access your WordPress login page</strong>.', 'all-in-one-wp-security-and-firewall'), $brute_force_login_feature_link, $rename_login_feature_link).'</p>
<p>'.__('These features are NOT functionally related. Having both of them enabled on your site means you are creating 2 layers of security.', 'all-in-one-wp-security-and-firewall').'</p>';
?>
Expand Down
59 changes: 34 additions & 25 deletions all-in-one-wp-security/admin/wp-security-dashboard-menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ function render_tab4()
<!-- For plugins, we also need to ensure that the form posts back to our current page -->
<input type="hidden" name="page" value="<?php echo esc_attr($_REQUEST['page']); ?>"/>
<?php
$blocked_ip_list->search_box('Search', 'search_permanent_block');
$blocked_ip_list->search_box(__('Search', 'all-in-one-wp-security-and-firewall'), 'search_permanent_block');
if (isset($_REQUEST["tab"])) {
echo '<input type="hidden" name="tab" value="' . esc_attr($_REQUEST["tab"]) . '" />';
}
Expand Down Expand Up @@ -586,16 +586,15 @@ function drawChart() {
function widget_spread_the_word() {
?>
<p><?php _e('We are working hard to make your WordPress site more secure. Please support us, here is how:', 'all-in-one-wp-security-and-firewall');?></p>
<p><a href="https://plus.google.com/+Tipsandtricks-hq/" target="_blank">Follow us on
Google+</a>
<p><a href="https://plus.google.com/+Tipsandtricks-hq/" target="_blank"><?php _e('Follow us on', 'all-in-one-wp-security-and-firewall');?> Google+</a>
</p>
<p>
<a href="http://twitter.com/intent/tweet?url=https://www.tipsandtricks-hq.com/wordpress-security-and-firewall-plugin&text=I love the All In One WP Security and Firewall plugin!"
target="_blank" class="aio_tweet_link">Post to Twitter</a>
target="_blank" class="aio_tweet_link"><?php _e('Post to Twitter', 'all-in-one-wp-security-and-firewall');?></a>
</p>
<p>
<a href="http://wordpress.org/support/view/plugin-reviews/all-in-one-wp-security-and-firewall/"
target="_blank" class="aio_rate_us_link">Give us a Good Rating</a>
target="_blank" class="aio_rate_us_link"><?php _e('Give us a Good Rating', 'all-in-one-wp-security-and-firewall');?></a>
</p>
<?php
}
Expand Down Expand Up @@ -780,31 +779,41 @@ function widget_brute_force() {

function widget_logged_in_users() {
$users_online_link = '<a href="admin.php?page=' . AIOWPSEC_USER_LOGIN_MENU_SLUG . '&tab=tab5">Logged In Users</a>';
// default display messages
$multiple_users_info_msg = __('Number of users currently logged into your site (including you) is:', 'all-in-one-wp-security-and-firewall');
$single_user_info_msg = __('There are no other users currently logged in.', 'all-in-one-wp-security-and-firewall');
if (AIOWPSecurity_Utility::is_multisite_install()) {
$logged_in_users = get_site_transient('users_online');
$num_users = count($logged_in_users);
if ($num_users > 1) {
echo '<div class="aio_red_box"><p>' . __('Number of users currently logged in site-wide is:', 'all-in-one-wp-security-and-firewall') . ' <strong>' . $num_users . '</strong></p>';
$info_msg = '<p>' . sprintf(__('Go to the %s menu to see more details', 'all-in-one-wp-security-and-firewall'), $users_online_link) . '</p>';
echo $info_msg . '</div>';
$current_blog_id = get_current_blog_id();
$is_main = is_main_site($current_blog_id);

if(empty($is_main)) {
// subsite - only get logged in users for this blog_id
$logged_in_users = AIOWPSecurity_User_Login::get_subsite_logged_in_users($current_blog_id);
} else {
echo '<div class="aio_green_box"><p>' . __('There are no other site-wide users currently logged in.', 'all-in-one-wp-security-and-firewall') . '</p></div>';
// main site - get sitewide users
$logged_in_users = get_site_transient('users_online');

// If viewing aiowps from multisite main network dashboard then display a different message
$multiple_users_info_msg = __('Number of users currently logged in site-wide (including you) is:', 'all-in-one-wp-security-and-firewall');
$single_user_info_msg = __('There are no other site-wide users currently logged in.', 'all-in-one-wp-security-and-firewall');
}
} else {
$logged_in_users = get_transient('users_online');
if ($logged_in_users === false || $logged_in_users == NULL) {
$num_users = 0;
} else {
$num_users = count($logged_in_users);
}
if ($num_users > 1) {
echo '<div class="aio_red_box"><p>' . __('Number of users currently logged into your site (including you) is:', 'all-in-one-wp-security-and-firewall') . ' <strong>' . $num_users . '</strong></p>';
$info_msg = '<p>' . sprintf(__('Go to the %s menu to see more details', 'all-in-one-wp-security-and-firewall'), $users_online_link) . '</p>';
echo $info_msg . '</div>';
} else {
echo '<div class="aio_green_box"><p>' . __('There are no other users currently logged in.', 'all-in-one-wp-security-and-firewall') . '</p></div>';
}
}
}

if (empty($logged_in_users)) {
$num_users = 0;
} else {
$num_users = count($logged_in_users);
}
if ($num_users > 1) {
echo '<div class="aio_red_box"><p>' . $multiple_users_info_msg . ' <strong>' . $num_users . '</strong></p>';
$info_msg = '<p>' . sprintf(__('Go to the %s menu to see more details', 'all-in-one-wp-security-and-firewall'), $users_online_link) . '</p>';
echo $info_msg . '</div>';
} else {
echo '<div class="aio_green_box"><p>' . $single_user_info_msg . '</p></div>';
}

}

function widget_locked_ip_addresses() {
Expand Down
2 changes: 1 addition & 1 deletion all-in-one-wp-security/admin/wp-security-filescan-menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ function render_tab2()
'<p>'.__('Often when malware code has been inserted into your site you will normally not notice anything out of the ordinary based on appearances, but it can have a dramatic effect on your site\'s search ranking.', 'all-in-one-wp-security-and-firewall').'</p>'.
'<p>'.__('This is because the bots and spiders from search engines such as Google have the capability to detect malware when they are indexing the pages on your site, and consequently they can blacklist your website which will in turn affect your search rankings.', 'all-in-one-wp-security-and-firewall').'</p>';

$site_scanners_link = '<a href="http://www.site-scanners.com" target="_blank">CLICK HERE</a>';
$site_scanners_link = '<a href="http://www.site-scanners.com" target="_blank">'.__('CLICK HERE', 'all-in-one-wp-security-and-firewall').'</a>';

echo '<h2>'.__('Scanning For Malware', 'all-in-one-wp-security-and-firewall').'</h2>';
echo '<p>'.__('Due to the constantly changing and complex nature of Malware, scanning for such things using a standalone plugin will not work reliably. This is something best done via an external scan of your site regularly.', 'all-in-one-wp-security-and-firewall').'</p>'.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ function render_tab4()
<div class="postbox">
<h3 class="hndle"><label for="title"><?php _e('View System Logs', 'all-in-one-wp-security-and-firewall'); ?></label></h3>
<div class="inside">
<p>Please click the button below to view the latest system logs:</p>
<p><?php _e('Please click the button below to view the latest system logs', 'all-in-one-wp-security-and-firewall'); ?>:</p>
<form action="" method="POST">
<?php wp_nonce_field('aiowpsec-view-system-logs-nonce'); ?>
<div><?php _e('Enter System Log File Name', 'all-in-one-wp-security-and-firewall')?>:
Expand Down
4 changes: 2 additions & 2 deletions all-in-one-wp-security/admin/wp-security-firewall-menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ function render_tab4()
<div class="aio_blue_box">
<?php
$info_msg = '';
$wiki_link = '<a href="http://en.wikipedia.org/wiki/Internet_bot" target="_blank">What is an Internet Bot</a>';
$wiki_link = '<a href="http://en.wikipedia.org/wiki/Internet_bot" target="_blank">'.__('What is an Internet Bot', 'all-in-one-wp-security-and-firewall').'</a>';
$info_msg .= '<p><strong>'.sprintf( __('%s?', 'all-in-one-wp-security-and-firewall'), $wiki_link).'</strong></p>';

$info_msg .= '<p>'. __('A bot is a piece of software which runs on the Internet and performs automatic tasks. For example when Google indexes your pages it uses automatic bots to achieve this task.', 'all-in-one-wp-security-and-firewall').'</p>';
Expand Down Expand Up @@ -968,7 +968,7 @@ function render_tab6()
<form id="tables-filter" method="post">
<!-- For plugins, we also need to ensure that the form posts back to our current page -->
<input type="hidden" name="page" value="<?php echo esc_attr($_REQUEST['page']); ?>" />
<?php $event_list_404->search_box('Search', 'search_404_events'); ?>
<?php $event_list_404->search_box(__('Search', 'all-in-one-wp-security-and-firewall'), 'search_404_events'); ?>
<?php
if(isset($_REQUEST["tab"]))
{
Expand Down
Loading

0 comments on commit daba281

Please sign in to comment.