Plugin Directory

Changeset 3283979


Ignore:
Timestamp:
04/29/2025 10:03:26 AM (11 months ago)
Author:
alessandro12
Message:

Version 1.12.2

Location:
captcha-ajax
Files:
19 added
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • captcha-ajax/trunk/captcha-ajax.php

    r3266437 r3283979  
    44Plugin URI: https://captcha-ajax.eu
    55Description: Captcha anti-spam. Login form, registration form, lost password form. The "Ajax" method allows the "Captcha" to work fine even if a page cache is active.
    6 Version: 1.12.0
     6Version: 1.12.2
    77Author: Alessandro Lin
    88License: GPL-2 or later
     
    5858);
    5959
    60 \add_action( 'admin_menu', function() {
    61     \add_options_page(
    62         \esc_html__('Captcha-Ajax Settings' , 'captcha-ajax'),
     60\add_action( 'admin_menu', function() {   
     61    if(\current_user_can('manage_options')){
     62        \add_filter( 'plugin_action_links_'. \plugin_basename(__FILE__), 'CaptAjx\add_link_plugin', 10, 4 );
     63    }
     64    \add_menu_page(
     65        \esc_html__('Captcha-Ajax Settings' , 'captcha-ajax'),
    6366        \esc_html__('Captcha-Ajax Settings', 'captcha-ajax' ),
    6467        'manage_options',
    6568        'captcha-ajax',
    66         'CaptAjx\captcha_admin');
    67 
    68     if(\current_user_can('manage_options')){
    69         \add_filter( 'plugin_action_links_'. \plugin_basename(__FILE__), 'CaptAjx\add_link_plugin', 10, 4 );
    70     }
     69        'CaptAjx\captcha_admin'
     70    );
    7171});
    7272
     
    187187    if( \esc_html( \get_option( 'wpCap_login') == 'yes' )){
    188188
    189         !null === 'SEL21' ? '' : define('SEL21', '<label id="capt_err" class="bookmarkClass" for="captcha_code_error">');
     189        defined('SEL21') || define('SEL21', '<label id="capt_err" class="bookmarkClass" for="captcha_code_error">');
    190190
    191191        if( \esc_html( \get_option( 'wpCap_failBan') == 'yes' )){
     
    328328    $searchBanned = [];
    329329    $searchBanned = \get_option('wpCap_Banned',['176.57.71.204' => ['banned' => 'N', 'expire'=> (int)0, 'counter'=> (int)3, 'expireCounter'=> (int)1714236139 ]]);
    330     $searchBanned = cap_sanitize_keys($searchBanned);   
     330    $searchBanned = cap_sanitize_keys($searchBanned);
    331331    if(array_key_exists(Ser::$ip, $searchBanned)){
    332332        if( \esc_html($searchBanned[Ser::$ip]['banned']) == 'Y'){
     
    959959        return htmlBefore_icons($flag);
    960960    }
    961     if(\esc_html( \get_option('wpCap_image') ) === 'AR'){ !null === 'CAPTX' ? '' : define('CAPTX', 'Type the RESULT displayed above'); } else { !null === 'CAPTX' ? '' : define('CAPTX', 'Type the text displayed above'); }
    962     $ajaxURL = \esc_url_raw(admin_url( 'admin-ajax.php') . '?action=capaction');
     961    $arit = '';
     962    $arit = \esc_html( \get_option('wpCap_image') );
     963    if($arit === 'AR' || $arit === 'AR_BW'){ defined('CAPTX') || define('CAPTX', 'Type the RESULT displayed above'); } else { defined('CAPTX') || define('CAPTX', 'Type the text displayed above'); }
     964    $ajaxURL = \esc_url_raw(\admin_url( 'admin-ajax.php') . '?action=capaction');
    963965    $refresh = \esc_html__('refresh image', 'captcha-ajax');
    964966
     
    997999        $soloForms = '<div id="soloForms"></div>';
    9981000    }
    999     $ajaxURL = \esc_url_raw(admin_url( 'admin-ajax.php') . '?action=capaction');
     1001    $ajaxURL = \esc_url_raw(\admin_url( 'admin-ajax.php') . '?action=capaction');
    10001002    $refresh = \esc_html__('refresh icon', 'captcha-ajax');
    10011003   
     
    11881190        $y = ($image_height - $textbox[5])/2;
    11891191
    1190         \imagefttext($image, $font_size, 0, $x, $y, $text_color, $font , $code);
     1192        \imagefttext($image, $font_size, 0, (int)$x, (int)$y, (int)$text_color, $font , $code);
    11911193
    11921194        \set_transient(htmlentities($BWvars->nameTransient), htmlentities($code), 900);
     
    13541356                $g = $s[1] - ((($s[1]-$e[1])/$steps)*$i);
    13551357                $b = $s[2] - ((($s[2]-$e[2])/$steps)*$i);
    1356                 $color = \imagecolorallocate($img,$r,$g,$b);
     1358                $color = \imagecolorallocate($img,(int)$r,(int)$g,(int)$b);
    13571359                \imagefilledrectangle($img,$x,$y+$i,$x1,$y+$i+1,$color);
    13581360            }
     
    14431445                $g = $s[1] - ((($s[1]-$e[1])/$steps)*$i);
    14441446                $b = $s[2] - ((($s[2]-$e[2])/$steps)*$i);
    1445                 $color = \imagecolorallocate($img,$r,$g,$b);
     1447                $color = \imagecolorallocate($img,(int)$r,(int)$g,(int)$b);
    14461448                \imagefilledrectangle($img,$x,$y+$i,$x1,$y+$i+1,$color);
    14471449            }
     
    15831585    ?>
    15841586    <div class="wrap">
    1585         <h1><?php \esc_html_e( 'Captcha Ajax ver. 1.12.0', 'captcha-ajax' );?></h1>
     1587        <h1><?php \esc_html_e( 'Captcha Ajax ver. 1.12.2', 'captcha-ajax' );?></h1>
    15861588
    15871589        <?php
     
    17501752            <table class="form-table">
    17511753                <tr>
    1752                     <th scope="row" class="px260"><?php \esc_html_e('Captcha for Contact Form 7 plugin', 'captcha-ajax');?>: </th>
    17531754                <?php
    17541755                if(!empty( \is_plugin_active("contact-form-7/wp-contact-form-7.php") )){
    17551756                ?>
     1757                    <th scope="row" class="px260"><?php \esc_html_e('Captcha for Contact Form 7 plugin', 'captcha-ajax');?>: </th>
     1758               
    17561759                    <td class="cp75w">
    17571760                        <select name="captcha_cf7_ax">
     
    17611764                    </td>
    17621765                <?php
    1763                 } else {
    1764                 ?>
    1765                     <td>
    1766                         <p class="descriptions"><strong><?php \esc_html_e('Contact Form 7 plugin not active', 'captcha-ajax'); ?> </strong></p>
    1767                     </td>
    1768                 <?php
    17691766                }
    17701767                ?>
    17711768                </tr>
    17721769                <tr>
     1770                    <?php
     1771                    if(!empty(\is_plugin_active("wpforms-lite/wpforms.php"))){
     1772                    ?>
    17731773                    <th scope="row" class="px260"><?php \esc_html_e('Captcha for WPForms plugin', 'captcha-ajax'); ?>: </th>
    1774                 <?php
    1775                 if(!empty(\is_plugin_active("wpforms-lite/wpforms.php"))){
    1776                 ?>
     1774               
    17771775                    <td class="cp75w">
    17781776                        <select name="captcha_wpf_ax">
     
    17811779                        </select>
    17821780                    </td>
    1783                 <?php
    1784                 } else {
    1785                 ?>
    1786                     <td>
    1787                         <p class="descriptions"><strong><?php  \esc_html_e('WPForms plugin not active', 'captcha-ajax'); ?> </strong></p>
    1788                     </td>
    1789                 <?php
    1790                 }
    1791                 ?>
     1781                    <?php
     1782                    }           
     1783                    ?>
    17921784                </tr>
    17931785                <tr>
     1786                    <?php
     1787                    if(!empty(\is_plugin_active("forminator/forminator.php"))){
     1788                    ?>
     1789
    17941790                    <th scope="row" class="px260"><?php \esc_html_e('Captcha for Forminator plugin', 'captcha-ajax'); ?>: </th>
    1795                 <?php
    1796                 if(!empty(\is_plugin_active("forminator/forminator.php"))){
    1797                 ?>
     1791               
    17981792                    <td class="cp75w">
    17991793                        <select name="captcha_forminator_ax">
     
    18031797                    </td>
    18041798                <?php
    1805                 } else {
    1806                 ?>
    1807                     <td>
    1808                         <p class="descriptions"><strong><?php  \esc_html_e('Forminator form plugin not active', 'captcha-ajax');  ?> </strong></p>
    1809                     </td>
    1810                 <?php
    1811                 }
     1799                }               
    18121800                ?>
    18131801                </tr>
    18141802            </table>
     1803            <h3 style="color:brown"><?php \esc_html_e( 'Captcha for WooCommerce', 'captcha-ajax' );?></h3>
     1804            <table>
     1805                <tbody>
     1806                <tr>
     1807                    <?php
     1808                    if(!empty(\is_plugin_active("woocommerce/woocommerce.php"))){
     1809                    ?>
     1810                    <th scope="row" class="px260"><?php \esc_html_e('Login', 'captcha-ajax'); ?>: </th>
     1811                    <td>
     1812                        <span>
     1813                            <?php echo \esc_html($login);  ?>
     1814                        </span>
     1815                    </td>
     1816                </tr>
     1817                <tr>
     1818                    <th scope="row" class="px260"><?php \esc_html_e('Password Lost', 'captcha-ajax'); ?>: </th>
     1819                    <td>
     1820                        <span>
     1821                        <?php echo \esc_html($lostpass); ?>
     1822                        </span>
     1823                    </td>
     1824                    <?php
     1825                    }
     1826                    ?>
     1827                </tr>
     1828                </tbody>
     1829            </table>
    18151830        </section>
    18161831
  • captcha-ajax/trunk/languages/captcha-ajax.pot

    r3266437 r3283979  
    44"Project-Id-Version: Captcha Ajax\n"
    55"Report-Msgid-Bugs-To: \n"
    6 "POT-Creation-Date: 2025-04-01 23:11+0000\n"
     6"POT-Creation-Date: 2025-04-28 10:41+0000\n"
    77"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    88"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1414"Content-Transfer-Encoding: 8bit\n"
    1515"X-Generator: Loco https://localise.biz/\n"
    16 "X-Loco-Version: 2.7.1; wp-6.7.2\n"
     16"X-Loco-Version: 2.7.2; wp-6.8\n"
    1717"X-Domain: captcha-ajax"
    1818
     
    2121msgstr ""
    2222
    23 #: captcha-ajax.php:1681
     23#: captcha-ajax.php:1683
    2424msgid "Alphabets only"
    2525msgstr ""
    2626
    27 #: captcha-ajax.php:1680
     27#: captcha-ajax.php:1682
    2828msgid "Alphanumeric"
    2929msgstr ""
    3030
    31 #: captcha-ajax.php:1886
     31#: captcha-ajax.php:1901
    3232msgid "bantime = 1200 "
    3333msgstr ""
    3434
     35#: captcha-ajax.php:1674
     36msgid "Capital & Small letters"
     37msgstr ""
     38
    3539#: captcha-ajax.php:1672
    36 msgid "Capital & Small letters"
    37 msgstr ""
    38 
    39 #: captcha-ajax.php:1670
    4040msgid "Capital letters only"
    4141msgstr ""
    4242
    43 #: captcha-ajax.php:967 captcha-ajax.php:981 captcha-ajax.php:1004
    44 #: captcha-ajax.php:1019
     43#: captcha-ajax.php:969 captcha-ajax.php:983 captcha-ajax.php:1006
     44#: captcha-ajax.php:1021
    4545msgid "Captcha"
    4646msgstr ""
     
    5050msgstr ""
    5151
    52 #: captcha-ajax.php:1585
    53 msgid "Captcha Ajax ver. 1.12.0"
     52#: captcha-ajax.php:1587
     53msgid "Captcha Ajax ver. 1.12.2"
    5454msgstr ""
    5555
     
    6565msgstr ""
    6666
    67 #: captcha-ajax.php:1701
     67#: captcha-ajax.php:1703
    6868msgid "Captcha display Options"
    6969msgstr ""
     
    7878msgstr ""
    7979
    80 #: captcha-ajax.php:1752
     80#: captcha-ajax.php:1757
    8181msgid "Captcha for Contact Form 7 plugin"
    8282msgstr ""
    8383
    84 #: captcha-ajax.php:1794
     84#: captcha-ajax.php:1790
    8585msgid "Captcha for Forminator plugin"
    8686msgstr ""
    8787
    88 #: captcha-ajax.php:1749
     88#: captcha-ajax.php:1751
    8989msgid "Captcha for Forms"
     90msgstr ""
     91
     92#: captcha-ajax.php:1803
     93msgid "Captcha for WooCommerce"
    9094msgstr ""
    9195
     
    98102msgstr ""
    99103
    100 #: captcha-ajax.php:62 captcha-ajax.php:63
     104#: captcha-ajax.php:65 captcha-ajax.php:66
    101105msgid "Captcha-Ajax Settings"
    102106msgstr ""
    103107
    104 #: captcha-ajax.php:1899
     108#: captcha-ajax.php:1914
    105109msgid "Check and delete transients options expired ( all options expired ) "
    106110msgstr ""
    107111
    108 #: captcha-ajax.php:1766
    109 msgid "Contact Form 7 plugin not active"
    110 msgstr ""
    111 
    112 #: captcha-ajax.php:1927
     112#: captcha-ajax.php:1942
    113113msgid "Default not active, for safety reasons."
    114114msgstr ""
    115115
    116 #: captcha-ajax.php:1731
     116#: captcha-ajax.php:1733
    117117msgid "Enable Captcha for Comments form"
    118118msgstr ""
    119119
    120 #: captcha-ajax.php:1704
     120#: captcha-ajax.php:1706
    121121msgid "Enable Captcha for Login form"
    122122msgstr ""
    123123
    124 #: captcha-ajax.php:1722
     124#: captcha-ajax.php:1724
    125125msgid "Enable Captcha for Lost Password form"
    126126msgstr ""
    127127
    128 #: captcha-ajax.php:1713
     128#: captcha-ajax.php:1715
    129129msgid "Enable Captcha for Register form"
    130130msgstr ""
    131131
    132 #: captcha-ajax.php:1081
     132#: captcha-ajax.php:1083
    133133msgid "Err no ajax call!"
    134134msgstr ""
     
    151151msgstr ""
    152152
    153 #: captcha-ajax.php:1897
     153#: captcha-ajax.php:1912
    154154msgid "Expired Transients"
    155155msgstr ""
    156156
    157 #: captcha-ajax.php:1885
     157#: captcha-ajax.php:1900
    158158msgid "findtime = 60 "
    159159msgstr ""
    160160
    161 #: captcha-ajax.php:1880
     161#: captcha-ajax.php:1895
    162162msgid "Firewall"
    163163msgstr ""
    164164
    165 #: captcha-ajax.php:1883
     165#: captcha-ajax.php:1898
    166166msgid "Firewall limiting access attempts."
    167167msgstr ""
    168168
    169 #: captcha-ajax.php:1808
    170 msgid "Forminator form plugin not active"
    171 msgstr ""
    172 
    173 #: captcha-ajax.php:1740
     169#: captcha-ajax.php:1742
    174170msgid "Hide Captcha for logged in users"
    175171msgstr ""
     
    183179msgstr ""
    184180
    185 #: captcha-ajax.php:1884
     181#: captcha-ajax.php:1810
     182msgid "Login"
     183msgstr ""
     184
     185#: captcha-ajax.php:1899
    186186msgid "maxretry = 7 "
    187187msgstr ""
    188188
    189 #: captcha-ajax.php:1708 captcha-ajax.php:1717 captcha-ajax.php:1726
    190 #: captcha-ajax.php:1735 captcha-ajax.php:1744 captcha-ajax.php:1759
    191 #: captcha-ajax.php:1780 captcha-ajax.php:1801 captcha-ajax.php:1891
     189#: captcha-ajax.php:1710 captcha-ajax.php:1719 captcha-ajax.php:1728
     190#: captcha-ajax.php:1737 captcha-ajax.php:1746 captcha-ajax.php:1762
     191#: captcha-ajax.php:1778 captcha-ajax.php:1795 captcha-ajax.php:1906
    192192msgid "No"
    193193msgstr ""
    194194
    195 #: captcha-ajax.php:1682
     195#: captcha-ajax.php:1684
    196196msgid "Numbers only"
    197197msgstr ""
    198198
    199 #: captcha-ajax.php:1592
     199#: captcha-ajax.php:1594
    200200msgid "Options saved."
    201201msgstr ""
    202202
    203 #: captcha-ajax.php:1000
     203#: captcha-ajax.php:1818
     204msgid "Password Lost"
     205msgstr ""
     206
     207#: captcha-ajax.php:1002
    204208msgid "refresh icon"
    205209msgstr ""
    206210
    207 #: captcha-ajax.php:963
     211#: captcha-ajax.php:965
    208212msgid "refresh image"
    209213msgstr ""
    210214
    211 #: captcha-ajax.php:1922
     215#: captcha-ajax.php:1937
    212216msgid "REST publicly menu"
    213217msgstr ""
    214218
    215 #: captcha-ajax.php:1677
     219#: captcha-ajax.php:1679
    216220msgid "Select a Captcha type"
    217221msgstr ""
    218222
    219 #: captcha-ajax.php:1829
     223#: captcha-ajax.php:1844
    220224msgid "Select Captcha Image"
    221225msgstr ""
    222226
    223 #: captcha-ajax.php:1667
     227#: captcha-ajax.php:1669
    224228msgid "Select Captcha letters type"
    225229msgstr ""
     
    229233msgstr ""
    230234
    231 #: captcha-ajax.php:1671
     235#: captcha-ajax.php:1673
    232236msgid "Small letters only"
    233237msgstr ""
    234238
    235 #: captcha-ajax.php:1590
     239#: captcha-ajax.php:1592
    236240msgid "Sorry, your nonce did not verify."
    237241msgstr ""
    238242
    239 #: captcha-ajax.php:1687
     243#: captcha-ajax.php:1689
    240244msgid "Total number of Captcha Characters"
    241245msgstr ""
    242246
    243 #: captcha-ajax.php:1914
     247#: captcha-ajax.php:1929
    244248msgid "with REST API. Use this URL"
    245249msgstr ""
    246250
    247 #: captcha-ajax.php:1925
     251#: captcha-ajax.php:1940
    248252msgid ""
    249253"With this feature, you can expose menus, menu items, and menu locations "
     
    251255msgstr ""
    252256
    253 #: captcha-ajax.php:1787
    254 msgid "WPForms plugin not active"
    255 msgstr ""
    256 
    257 #: captcha-ajax.php:1707 captcha-ajax.php:1716 captcha-ajax.php:1725
    258 #: captcha-ajax.php:1734 captcha-ajax.php:1743 captcha-ajax.php:1758
    259 #: captcha-ajax.php:1779 captcha-ajax.php:1800 captcha-ajax.php:1890
     257#: captcha-ajax.php:1709 captcha-ajax.php:1718 captcha-ajax.php:1727
     258#: captcha-ajax.php:1736 captcha-ajax.php:1745 captcha-ajax.php:1761
     259#: captcha-ajax.php:1777 captcha-ajax.php:1794 captcha-ajax.php:1905
    260260msgid "Yes"
    261261msgstr ""
    262262
    263 #: captcha-ajax.php:1913
     263#: captcha-ajax.php:1928
    264264msgid "You can also remove expired transients   "
    265265msgstr ""
    266266
    267 #: captcha-ajax.php:1929
     267#: captcha-ajax.php:1944
    268268msgid "You have to specifically activate it. WP version 6.8.0 or higher"
    269269msgstr ""
  • captcha-ajax/trunk/readme.txt

    r3266437 r3283979  
    66Tested up to: 6.8
    77Requires PHP: 7.2.24
    8 Stable tag: 1.12.0
     8Stable tag: 1.12.2
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    9797== Installation ==
    9898- Upload the Captcha-Ajax plugin to your site and activate it.
    99 - Admin page: Dashboard > Settings > Captcha-Ajax Settings.
     99- Admin page: Dashboard > Captcha-Ajax Settings.
     100- Admin page: Dashboard > Plugins > Captcha-ajax settings
    100101
    101102== Support ==
     
    116117
    117118== Changelog ==
     119= 1.12.2 =
     120Change Item in Admin Menu.
     121
    118122= 1.12.0 =
    119123Added Arithmetics Captcha Image Black and White
Note: See TracChangeset for help on using the changeset viewer.