Plugin Directory

Changeset 3482976


Ignore:
Timestamp:
03/15/2026 09:29:47 AM (13 days ago)
Author:
inilerm
Message:

Preparing version 8.9.2

Location:
advanced-ip-blocker/trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • advanced-ip-blocker/trunk/advanced-ip-blocker.php

    r3482528 r3482976  
    44Plugin URI: https://advaipbl.com/
    55Description: Your complete WordPress security firewall. Blocks IPs, bots & countries. Includes an intelligent WAF, Threat Scoring, and Two-Factor Authentication.
    6 Version: 8.9.1
     6Version: 8.9.2
    77Author: IniLerm
    88Author URI: https://advaipbl.com/
     
    1919}
    2020
    21 define( 'ADVAIPBL_VERSION', '8.9.1' );
     21define( 'ADVAIPBL_VERSION', '8.9.2' );
    2222define( 'ADVAIPBL_PLUGIN_FILE', __FILE__ );
    2323
  • advanced-ip-blocker/trunk/css/advaipbl-styles.css

    r3482528 r3482976  
    11/**
    22 * Advanced IP Blocker - Admin Panel Styles
    3  * Version: 8.9.1
     3 * Version: 8.9.2
    44 */
    55
  • advanced-ip-blocker/trunk/includes/class-advaipbl-settings-manager.php

    r3482528 r3482976  
    16311631        $all_countries     = $this->plugin->get_country_list();
    16321632        ?>
    1633         <select id="<?php echo esc_attr($select_id); ?>" name="advaipbl_settings[<?php echo esc_attr($option_name); ?>][]" class="advaipbl-country-select" multiple="multiple" style="width: 100%;" data-placeholder="<?php echo esc_attr($placeholder_text); ?>">
    1634             <?php foreach ( $all_countries as $code => $name ) : ?>
    1635                 <option value="<?php echo esc_attr( $code ); ?>" <?php selected( in_array( $code, $selected_countries, true ) ); ?>>
    1636                     <?php echo esc_html( $name ); ?>
    1637                 </option>
    1638             <?php endforeach; ?>
    1639         </select>
     1633        <div class="advaipbl-country-selector-wrapper" data-target="<?php echo esc_attr($select_id); ?>">
     1634            <select id="<?php echo esc_attr($select_id); ?>" name="advaipbl_settings[<?php echo esc_attr($option_name); ?>][]" class="advaipbl-country-select" multiple="multiple" style="width: 100%;" data-placeholder="<?php echo esc_attr($placeholder_text); ?>">
     1635                <?php foreach ( $all_countries as $code => $name ) : ?>
     1636                    <option value="<?php echo esc_attr( $code ); ?>" <?php selected( in_array( $code, $selected_countries, true ) ); ?>>
     1637                        <?php echo esc_html( $name ); ?>
     1638                    </option>
     1639                <?php endforeach; ?>
     1640            </select>
     1641            <div style="margin-top: 10px;">
     1642                <button type="button" class="button button-small advaipbl-toggle-raw-countries">
     1643                    <?php esc_html_e('Copy/Paste Raw Codes', 'advanced-ip-blocker'); ?>
     1644                </button>
     1645            </div>
     1646            <div class="advaipbl-raw-countries-container" style="display: none; margin-top: 10px; padding: 15px; background: #f9f9f9; border: 1px solid #ccd0d4;">
     1647                <p style="margin-top: 0;"><strong><?php esc_html_e('Raw Country Codes', 'advanced-ip-blocker'); ?></strong></p>
     1648                <p class="description" style="margin-bottom: 10px;"><?php esc_html_e('Paste a list of 2-letter country codes (e.g., US, CA, MX). Invalid codes will be safely ignored.', 'advanced-ip-blocker'); ?></p>
     1649                <textarea class="advaipbl-raw-countries-input large-text code" rows="4"></textarea>
     1650                <div style="margin-top: 10px; display: flex; align-items: center;">
     1651                    <button type="button" class="button button-primary advaipbl-apply-raw-countries">
     1652                        <?php esc_html_e('Apply to List', 'advanced-ip-blocker'); ?>
     1653                    </button>
     1654                    <button type="button" class="button button-secondary advaipbl-cancel-raw-countries" style="margin-left: 10px;">
     1655                        <?php esc_html_e('Cancel', 'advanced-ip-blocker'); ?>
     1656                    </button>
     1657                    <span class="advaipbl-raw-countries-feedback" style="margin-left: 15px; font-weight: 600;"></span>
     1658                </div>
     1659            </div>
     1660        </div>
    16401661        <?php if (isset($args['description'])) : ?>
    16411662            <p class="description"><?php echo wp_kses_post($args['description']); ?></p>
  • advanced-ip-blocker/trunk/js/admin-settings.js

    r3481949 r3482976  
    785785    }
    786786
     787    function initRawCountryEditor() {
     788        $('body').on('click', '.advaipbl-toggle-raw-countries', function() {
     789            const $wrapper = $(this).closest('.advaipbl-country-selector-wrapper');
     790            const selectId = $wrapper.data('target');
     791            const $select = $('#' + selectId);
     792            const $container = $wrapper.find('.advaipbl-raw-countries-container');
     793            const $textarea = $wrapper.find('.advaipbl-raw-countries-input');
     794            const $feedback = $wrapper.find('.advaipbl-raw-countries-feedback');
     795           
     796            const currentSelected = $select.val() || [];
     797            $textarea.val(currentSelected.join(', '));
     798            $feedback.text('').css('color', '');
     799           
     800            $(this).hide();
     801            $container.slideDown('fast');
     802        });
     803
     804        $('body').on('click', '.advaipbl-cancel-raw-countries', function() {
     805            const $wrapper = $(this).closest('.advaipbl-country-selector-wrapper');
     806            $wrapper.find('.advaipbl-raw-countries-container').slideUp('fast', function() {
     807                $wrapper.find('.advaipbl-toggle-raw-countries').show();
     808            });
     809        });
     810
     811        $('body').on('click', '.advaipbl-apply-raw-countries', function() {
     812            const $wrapper = $(this).closest('.advaipbl-country-selector-wrapper');
     813            const selectId = $wrapper.data('target');
     814            const $select = $('#' + selectId);
     815            const $textarea = $wrapper.find('.advaipbl-raw-countries-input');
     816            const $feedback = $wrapper.find('.advaipbl-raw-countries-feedback');
     817           
     818            const rawText = $textarea.val().toUpperCase();
     819            const matches = rawText.match(/\b[A-Z]{2}\b/g) || [];
     820           
     821            const validOptions = new Set();
     822            $select.find('option').each(function() {
     823                const val = $(this).val();
     824                if (val) validOptions.add(val);
     825            });
     826           
     827            const selectedCodes = [];
     828            let invalidCount = 0;
     829           
     830            matches.forEach(code => {
     831                if (validOptions.has(code)) {
     832                    if (!selectedCodes.includes(code)) {
     833                        selectedCodes.push(code);
     834                    }
     835                } else {
     836                    invalidCount++;
     837                }
     838            });
     839           
     840            $select.val(selectedCodes).trigger('change');
     841            if ($.fn.select2) {
     842                $select.trigger('change.select2');
     843            }
     844           
     845            let feedbackText = `Applied ${selectedCodes.length} codes.`;
     846               
     847            if (invalidCount > 0) {
     848                feedbackText += ` (Ignored ${invalidCount} invalid)`;
     849                $feedback.css('color', '#f56e28');
     850            } else {
     851                $feedback.css('color', '#00a32a');
     852            }
     853           
     854            $feedback.text(feedbackText);
     855            $textarea.val(selectedCodes.join(', '));
     856        });
     857    }
     858
    787859    // Initialize Settings Logic
    788860    initGeolocationOptionsToggle();
     
    804876    initFIMActions();
    805877    initCountrySelectors();
     878    initRawCountryEditor();
    806879    initWhitelistAjaxButton();
    807880
  • advanced-ip-blocker/trunk/languages/advanced-ip-blocker-es_ES.po

    r3481949 r3482976  
    55"blocker\n"
    66"POT-Creation-Date: 2025-07-22 14:47+0200\n"
    7 "PO-Revision-Date: 2026-03-11 11:29+0100\n"
     7"PO-Revision-Date: 2026-03-15 10:24+0100\n"
    88"Last-Translator: \n"
    99"Language-Team: \n"
     
    17721772#: includes/class-advaipbl-main.php
    17731773#: includes/class-advaipbl-admin-pages.php:1493
     1774#: includes/class-advaipbl-settings-manager.php:1639
    17741775msgid "Cancel"
    17751776msgstr "Cancelar"
     
    81738174msgid "30 Days"
    81748175msgstr "30 días"
     8176
     8177#: includes/class-advaipbl-settings-manager.php:1631
     8178msgid "Copy/Paste Raw Codes"
     8179msgstr "Copiar/Pegar Raw Codes"
     8180
     8181#: includes/class-advaipbl-settings-manager.php:1635
     8182msgid "Paste a list of 2-letter country codes..."
     8183msgstr "Pegue una lista de códigos de país de 2 letras..."
     8184
     8185#: includes/class-advaipbl-settings-manager.php:1638
     8186msgid "Apply to List"
     8187msgstr "Aplicar a la lista"
     8188
     8189#: includes/class-advaipbl-settings-manager.php:1651
     8190msgid "Select one or more countries. Type in the box to search."
     8191msgstr "Seleccione uno o más países. Escriba en el cuadro para buscar."
    81758192
    81768193#~ msgid "Installed Themes Analysis"
     
    88458862#~ "IP Blocker."
    88468863
    8847 #~ msgid "Apply Filters"
    8848 #~ msgstr "Aplicar filtros"
    8849 
    88508864#, php-format
    88518865#~ msgid ""
  • advanced-ip-blocker/trunk/languages/advanced-ip-blocker.pot

    r3481949 r3482976  
    44msgid ""
    55msgstr ""
    6 "Project-Id-Version: Advanced IP Blocker 8.9.0\n"
     6"Project-Id-Version: Advanced IP Blocker 8.9.2\n"
    77"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/advanced-ip-blocker\n"
    88"POT-Creation-Date: 2025-07-22 14:47+0200\n"
     
    74367436msgid "30 Days"
    74377437msgstr ""
     7438
     7439#: includes/class-advaipbl-settings-manager.php:1631
     7440msgid "Copy/Paste Raw Codes"
     7441msgstr ""
     7442
     7443#: includes/class-advaipbl-settings-manager.php:1635
     7444msgid "Paste a list of 2-letter country codes..."
     7445msgstr ""
     7446
     7447#: includes/class-advaipbl-settings-manager.php:1638
     7448msgid "Apply to List"
     7449msgstr ""
     7450
     7451#: includes/class-advaipbl-settings-manager.php:1639
     7452msgid "Cancel"
     7453msgstr ""
     7454
     7455#: includes/class-advaipbl-settings-manager.php:1651
     7456msgid "Select one or more countries. Type in the box to search."
     7457msgstr ""
  • advanced-ip-blocker/trunk/readme.txt

    r3482528 r3482976  
    66Requires at least: 6.7
    77Tested up to: 6.9
    8 Stable tag: 8.9.1
     8Stable tag: 8.9.2
    99Requires PHP: 8.1
    1010License: GPLv2 or later
     
    2121
    2222**Key Features:**
     23*   **(NEW) Country Selector Copy/Paste:** Say goodbye to manually selecting 50+ countries. You can now instantly copy and paste a raw list of 2-letter country codes directly into Geoblocking, Geo-Challenge, and Whitelist Login fields.
    2324*   **(NEW) AIB Cloud Network V3:** Upgrade to the next-generation distributed threat intelligence network. The new API V3 provides secure, individual API Keys per site, drastically improving synchronization reliability, threat telemetry, and global network stability.
    2425*   **(NEW) Whitelist Login Countries:** Take absolute control over administrative access. Easily restrict your WordPress login page and XML-RPC to only allow connections from specific, whitelisted countries, instantly blocking unauthorized foreign login attempts.
     
    226227== Changelog ==
    227228
     229= 8.9.2 =
     230*   **NEW FEATURE:** Select2 Country Copy/Paste. You no longer have to manually select 50+ countries repeatedly on multi-site environments. A new hidden tool now lets you copy completely raw 2-letter codes from any source and paste them straight into Geoblocking, GeoChallenge, and Whitelist Login Country elements.
     231*   **UX:** Added a clear warning to users that having intersecting rules between Geoblocking and Whitelist Login Countries leads to undefined behavior.
     232
    228233= 8.9.1 =
    229234*   **UX ENHANCEMENT:** Grouped "Geoblocking" and "Geo-Challenge" settings into a single, cohesive "Geo-Security" section to improve clarity and reduce confusion. Thank you to the community for this excellent suggestion!
     
    245250== Upgrade Notice ==
    246251
     252= 8.9.2 =
     253**NEW FEATURE UPDATE:** Introducing a seamless way to duplicate your 50+ country configurations! Update to 8.9.2 to instantly access the new Select2 Country Copy/Paste logic tool within the advanced Geoblocking features.
     254
    247255= 8.9.1 =
    248256**MINOR UPDATE:** A quick User Experience (UX) update that reorganizes the geographic security settings into a unified "Geo-Security" section, making configuration much more intuitive.
Note: See TracChangeset for help on using the changeset viewer.