Changeset 3283979
- Timestamp:
- 04/29/2025 10:03:26 AM (11 months ago)
- Location:
- captcha-ajax
- Files:
-
- 19 added
- 1 deleted
- 3 edited
-
tags/1.11.1 (deleted)
-
tags/1.12.2 (added)
-
tags/1.12.2/DejaVuSans-Bold.ttf (added)
-
tags/1.12.2/DejaVuSansMono-Bold.ttf (added)
-
tags/1.12.2/DejaVuSerif-Bold.ttf (added)
-
tags/1.12.2/LICENSE.txt (added)
-
tags/1.12.2/assets (added)
-
tags/1.12.2/assets/Captcha_arithmetic_BW.png (added)
-
tags/1.12.2/assets/Captcha_arithmetic_image.png (added)
-
tags/1.12.2/assets/Captcha_default_image.webp (added)
-
tags/1.12.2/assets/Captcha_icons_image.webp (added)
-
tags/1.12.2/assets/Captcha_minimal_image.webp (added)
-
tags/1.12.2/assets/Captcha_multicolor_image.webp (added)
-
tags/1.12.2/assets/FasterOne-Regular.ttf (added)
-
tags/1.12.2/assets/monofont.ttf (added)
-
tags/1.12.2/captcha-ajax.php (added)
-
tags/1.12.2/languages (added)
-
tags/1.12.2/languages/captcha-ajax.pot (added)
-
tags/1.12.2/readme.txt (added)
-
tags/1.12.2/uninstall.php (added)
-
trunk/captcha-ajax.php (modified) (14 diffs)
-
trunk/languages/captcha-ajax.pot (modified) (11 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
captcha-ajax/trunk/captcha-ajax.php
r3266437 r3283979 4 4 Plugin URI: https://captcha-ajax.eu 5 5 Description: 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. 06 Version: 1.12.2 7 7 Author: Alessandro Lin 8 8 License: GPL-2 or later … … 58 58 ); 59 59 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'), 63 66 \esc_html__('Captcha-Ajax Settings', 'captcha-ajax' ), 64 67 'manage_options', 65 68 '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 ); 71 71 }); 72 72 … … 187 187 if( \esc_html( \get_option( 'wpCap_login') == 'yes' )){ 188 188 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">'); 190 190 191 191 if( \esc_html( \get_option( 'wpCap_failBan') == 'yes' )){ … … 328 328 $searchBanned = []; 329 329 $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); 331 331 if(array_key_exists(Ser::$ip, $searchBanned)){ 332 332 if( \esc_html($searchBanned[Ser::$ip]['banned']) == 'Y'){ … … 959 959 return htmlBefore_icons($flag); 960 960 } 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'); 963 965 $refresh = \esc_html__('refresh image', 'captcha-ajax'); 964 966 … … 997 999 $soloForms = '<div id="soloForms"></div>'; 998 1000 } 999 $ajaxURL = \esc_url_raw( admin_url( 'admin-ajax.php') . '?action=capaction');1001 $ajaxURL = \esc_url_raw(\admin_url( 'admin-ajax.php') . '?action=capaction'); 1000 1002 $refresh = \esc_html__('refresh icon', 'captcha-ajax'); 1001 1003 … … 1188 1190 $y = ($image_height - $textbox[5])/2; 1189 1191 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); 1191 1193 1192 1194 \set_transient(htmlentities($BWvars->nameTransient), htmlentities($code), 900); … … 1354 1356 $g = $s[1] - ((($s[1]-$e[1])/$steps)*$i); 1355 1357 $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); 1357 1359 \imagefilledrectangle($img,$x,$y+$i,$x1,$y+$i+1,$color); 1358 1360 } … … 1443 1445 $g = $s[1] - ((($s[1]-$e[1])/$steps)*$i); 1444 1446 $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); 1446 1448 \imagefilledrectangle($img,$x,$y+$i,$x1,$y+$i+1,$color); 1447 1449 } … … 1583 1585 ?> 1584 1586 <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> 1586 1588 1587 1589 <?php … … 1750 1752 <table class="form-table"> 1751 1753 <tr> 1752 <th scope="row" class="px260"><?php \esc_html_e('Captcha for Contact Form 7 plugin', 'captcha-ajax');?>: </th>1753 1754 <?php 1754 1755 if(!empty( \is_plugin_active("contact-form-7/wp-contact-form-7.php") )){ 1755 1756 ?> 1757 <th scope="row" class="px260"><?php \esc_html_e('Captcha for Contact Form 7 plugin', 'captcha-ajax');?>: </th> 1758 1756 1759 <td class="cp75w"> 1757 1760 <select name="captcha_cf7_ax"> … … 1761 1764 </td> 1762 1765 <?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 <?php1769 1766 } 1770 1767 ?> 1771 1768 </tr> 1772 1769 <tr> 1770 <?php 1771 if(!empty(\is_plugin_active("wpforms-lite/wpforms.php"))){ 1772 ?> 1773 1773 <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 1777 1775 <td class="cp75w"> 1778 1776 <select name="captcha_wpf_ax"> … … 1781 1779 </select> 1782 1780 </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 ?> 1792 1784 </tr> 1793 1785 <tr> 1786 <?php 1787 if(!empty(\is_plugin_active("forminator/forminator.php"))){ 1788 ?> 1789 1794 1790 <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 1798 1792 <td class="cp75w"> 1799 1793 <select name="captcha_forminator_ax"> … … 1803 1797 </td> 1804 1798 <?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 } 1812 1800 ?> 1813 1801 </tr> 1814 1802 </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> 1815 1830 </section> 1816 1831 -
captcha-ajax/trunk/languages/captcha-ajax.pot
r3266437 r3283979 4 4 "Project-Id-Version: Captcha Ajax\n" 5 5 "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" 7 7 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 8 8 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 14 14 "Content-Transfer-Encoding: 8bit\n" 15 15 "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" 17 17 "X-Domain: captcha-ajax" 18 18 … … 21 21 msgstr "" 22 22 23 #: captcha-ajax.php:168 123 #: captcha-ajax.php:1683 24 24 msgid "Alphabets only" 25 25 msgstr "" 26 26 27 #: captcha-ajax.php:168 027 #: captcha-ajax.php:1682 28 28 msgid "Alphanumeric" 29 29 msgstr "" 30 30 31 #: captcha-ajax.php:1 88631 #: captcha-ajax.php:1901 32 32 msgid "bantime = 1200 " 33 33 msgstr "" 34 34 35 #: captcha-ajax.php:1674 36 msgid "Capital & Small letters" 37 msgstr "" 38 35 39 #: captcha-ajax.php:1672 36 msgid "Capital & Small letters"37 msgstr ""38 39 #: captcha-ajax.php:167040 40 msgid "Capital letters only" 41 41 msgstr "" 42 42 43 #: captcha-ajax.php:96 7 captcha-ajax.php:981 captcha-ajax.php:100444 #: captcha-ajax.php:10 1943 #: captcha-ajax.php:969 captcha-ajax.php:983 captcha-ajax.php:1006 44 #: captcha-ajax.php:1021 45 45 msgid "Captcha" 46 46 msgstr "" … … 50 50 msgstr "" 51 51 52 #: captcha-ajax.php:158 553 msgid "Captcha Ajax ver. 1.12. 0"52 #: captcha-ajax.php:1587 53 msgid "Captcha Ajax ver. 1.12.2" 54 54 msgstr "" 55 55 … … 65 65 msgstr "" 66 66 67 #: captcha-ajax.php:170 167 #: captcha-ajax.php:1703 68 68 msgid "Captcha display Options" 69 69 msgstr "" … … 78 78 msgstr "" 79 79 80 #: captcha-ajax.php:175 280 #: captcha-ajax.php:1757 81 81 msgid "Captcha for Contact Form 7 plugin" 82 82 msgstr "" 83 83 84 #: captcha-ajax.php:179 484 #: captcha-ajax.php:1790 85 85 msgid "Captcha for Forminator plugin" 86 86 msgstr "" 87 87 88 #: captcha-ajax.php:17 4988 #: captcha-ajax.php:1751 89 89 msgid "Captcha for Forms" 90 msgstr "" 91 92 #: captcha-ajax.php:1803 93 msgid "Captcha for WooCommerce" 90 94 msgstr "" 91 95 … … 98 102 msgstr "" 99 103 100 #: captcha-ajax.php:6 2 captcha-ajax.php:63104 #: captcha-ajax.php:65 captcha-ajax.php:66 101 105 msgid "Captcha-Ajax Settings" 102 106 msgstr "" 103 107 104 #: captcha-ajax.php:1 899108 #: captcha-ajax.php:1914 105 109 msgid "Check and delete transients options expired ( all options expired ) " 106 110 msgstr "" 107 111 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 113 113 msgid "Default not active, for safety reasons." 114 114 msgstr "" 115 115 116 #: captcha-ajax.php:173 1116 #: captcha-ajax.php:1733 117 117 msgid "Enable Captcha for Comments form" 118 118 msgstr "" 119 119 120 #: captcha-ajax.php:170 4120 #: captcha-ajax.php:1706 121 121 msgid "Enable Captcha for Login form" 122 122 msgstr "" 123 123 124 #: captcha-ajax.php:172 2124 #: captcha-ajax.php:1724 125 125 msgid "Enable Captcha for Lost Password form" 126 126 msgstr "" 127 127 128 #: captcha-ajax.php:171 3128 #: captcha-ajax.php:1715 129 129 msgid "Enable Captcha for Register form" 130 130 msgstr "" 131 131 132 #: captcha-ajax.php:108 1132 #: captcha-ajax.php:1083 133 133 msgid "Err no ajax call!" 134 134 msgstr "" … … 151 151 msgstr "" 152 152 153 #: captcha-ajax.php:1 897153 #: captcha-ajax.php:1912 154 154 msgid "Expired Transients" 155 155 msgstr "" 156 156 157 #: captcha-ajax.php:1 885157 #: captcha-ajax.php:1900 158 158 msgid "findtime = 60 " 159 159 msgstr "" 160 160 161 #: captcha-ajax.php:18 80161 #: captcha-ajax.php:1895 162 162 msgid "Firewall" 163 163 msgstr "" 164 164 165 #: captcha-ajax.php:18 83165 #: captcha-ajax.php:1898 166 166 msgid "Firewall limiting access attempts." 167 167 msgstr "" 168 168 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 174 170 msgid "Hide Captcha for logged in users" 175 171 msgstr "" … … 183 179 msgstr "" 184 180 185 #: captcha-ajax.php:1884 181 #: captcha-ajax.php:1810 182 msgid "Login" 183 msgstr "" 184 185 #: captcha-ajax.php:1899 186 186 msgid "maxretry = 7 " 187 187 msgstr "" 188 188 189 #: captcha-ajax.php:17 08 captcha-ajax.php:1717 captcha-ajax.php:1726190 #: captcha-ajax.php:173 5 captcha-ajax.php:1744 captcha-ajax.php:1759191 #: captcha-ajax.php:17 80 captcha-ajax.php:1801 captcha-ajax.php:1891189 #: 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 192 192 msgid "No" 193 193 msgstr "" 194 194 195 #: captcha-ajax.php:168 2195 #: captcha-ajax.php:1684 196 196 msgid "Numbers only" 197 197 msgstr "" 198 198 199 #: captcha-ajax.php:159 2199 #: captcha-ajax.php:1594 200 200 msgid "Options saved." 201 201 msgstr "" 202 202 203 #: captcha-ajax.php:1000 203 #: captcha-ajax.php:1818 204 msgid "Password Lost" 205 msgstr "" 206 207 #: captcha-ajax.php:1002 204 208 msgid "refresh icon" 205 209 msgstr "" 206 210 207 #: captcha-ajax.php:96 3211 #: captcha-ajax.php:965 208 212 msgid "refresh image" 209 213 msgstr "" 210 214 211 #: captcha-ajax.php:19 22215 #: captcha-ajax.php:1937 212 216 msgid "REST publicly menu" 213 217 msgstr "" 214 218 215 #: captcha-ajax.php:167 7219 #: captcha-ajax.php:1679 216 220 msgid "Select a Captcha type" 217 221 msgstr "" 218 222 219 #: captcha-ajax.php:18 29223 #: captcha-ajax.php:1844 220 224 msgid "Select Captcha Image" 221 225 msgstr "" 222 226 223 #: captcha-ajax.php:166 7227 #: captcha-ajax.php:1669 224 228 msgid "Select Captcha letters type" 225 229 msgstr "" … … 229 233 msgstr "" 230 234 231 #: captcha-ajax.php:167 1235 #: captcha-ajax.php:1673 232 236 msgid "Small letters only" 233 237 msgstr "" 234 238 235 #: captcha-ajax.php:159 0239 #: captcha-ajax.php:1592 236 240 msgid "Sorry, your nonce did not verify." 237 241 msgstr "" 238 242 239 #: captcha-ajax.php:168 7243 #: captcha-ajax.php:1689 240 244 msgid "Total number of Captcha Characters" 241 245 msgstr "" 242 246 243 #: captcha-ajax.php:19 14247 #: captcha-ajax.php:1929 244 248 msgid "with REST API. Use this URL" 245 249 msgstr "" 246 250 247 #: captcha-ajax.php:19 25251 #: captcha-ajax.php:1940 248 252 msgid "" 249 253 "With this feature, you can expose menus, menu items, and menu locations " … … 251 255 msgstr "" 252 256 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 260 260 msgid "Yes" 261 261 msgstr "" 262 262 263 #: captcha-ajax.php:19 13263 #: captcha-ajax.php:1928 264 264 msgid "You can also remove expired transients " 265 265 msgstr "" 266 266 267 #: captcha-ajax.php:19 29267 #: captcha-ajax.php:1944 268 268 msgid "You have to specifically activate it. WP version 6.8.0 or higher" 269 269 msgstr "" -
captcha-ajax/trunk/readme.txt
r3266437 r3283979 6 6 Tested up to: 6.8 7 7 Requires PHP: 7.2.24 8 Stable tag: 1.12. 08 Stable tag: 1.12.2 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 97 97 == Installation == 98 98 - 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 100 101 101 102 == Support == … … 116 117 117 118 == Changelog == 119 = 1.12.2 = 120 Change Item in Admin Menu. 121 118 122 = 1.12.0 = 119 123 Added Arithmetics Captcha Image Black and White
Note: See TracChangeset
for help on using the changeset viewer.