Changeset 3414300
- Timestamp:
- 12/08/2025 12:57:28 PM (4 months ago)
- Location:
- google-captcha
- Files:
-
- 180 added
- 6 edited
-
tags/1.85 (added)
-
tags/1.85/bws_menu (added)
-
tags/1.85/bws_menu/bws_functions.php (added)
-
tags/1.85/bws_menu/bws_include.php (added)
-
tags/1.85/bws_menu/bws_menu.php (added)
-
tags/1.85/bws_menu/class-bws-settings.php (added)
-
tags/1.85/bws_menu/css (added)
-
tags/1.85/bws_menu/css/general_style.css (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.10.4 (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.10.4/images (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.10.4/images/animated-overlay.gif (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.10.4/images/ui-bg_flat_0_aaaaaa_40x100.png (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.10.4/images/ui-bg_flat_75_ffffff_40x100.png (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.10.4/images/ui-bg_glass_55_fbf9ee_1x400.png (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.10.4/images/ui-bg_glass_65_ffffff_1x400.png (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.10.4/images/ui-bg_glass_75_dadada_1x400.png (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.10.4/images/ui-bg_glass_75_e6e6e6_1x400.png (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.10.4/images/ui-bg_glass_95_fef1ec_1x400.png (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.10.4/images/ui-bg_highlight-soft_75_cccccc_1x100.png (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.10.4/images/ui-icons_222222_256x240.png (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.10.4/images/ui-icons_2e83ff_256x240.png (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.10.4/images/ui-icons_454545_256x240.png (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.10.4/images/ui-icons_888888_256x240.png (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.10.4/images/ui-icons_cd0a0a_256x240.png (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.10.4/jquery-ui.css (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.11.4 (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.11.4/images (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.11.4/images/ui-bg_flat_0_aaaaaa_40x100.png (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.11.4/images/ui-bg_flat_75_ffffff_40x100.png (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.11.4/images/ui-bg_glass_55_fbf9ee_1x400.png (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.11.4/images/ui-bg_glass_65_ffffff_1x400.png (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.11.4/images/ui-bg_glass_75_dadada_1x400.png (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.11.4/images/ui-bg_glass_75_e6e6e6_1x400.png (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.11.4/images/ui-bg_glass_95_fef1ec_1x400.png (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.11.4/images/ui-bg_highlight-soft_75_cccccc_1x100.png (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.11.4/images/ui-icons_222222_256x240.png (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.11.4/images/ui-icons_2e83ff_256x240.png (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.11.4/images/ui-icons_454545_256x240.png (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.11.4/images/ui-icons_888888_256x240.png (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.11.4/images/ui-icons_cd0a0a_256x240.png (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.11.4/jquery-ui.css (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.12.1 (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.12.1/images (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.12.1/images/ui-bg_glass_55_fbf9ee_1x400.png (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.12.1/images/ui-bg_glass_65_ffffff_1x400.png (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.12.1/images/ui-bg_glass_75_dadada_1x400.png (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.12.1/images/ui-bg_glass_75_e6e6e6_1x400.png (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.12.1/images/ui-bg_glass_95_fef1ec_1x400.png (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.12.1/images/ui-bg_highlight-soft_75_cccccc_1x100.png (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.12.1/images/ui-icons_222222_256x240.png (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.12.1/images/ui-icons_2e83ff_256x240.png (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.12.1/images/ui-icons_454545_256x240.png (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.12.1/images/ui-icons_888888_256x240.png (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.12.1/images/ui-icons_cd0a0a_256x240.png (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.12.1/jquery-ui.css (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.9.2 (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.9.2/images (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.9.2/images/ui-bg_flat_0_aaaaaa_40x100.png (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.9.2/images/ui-bg_flat_75_ffffff_40x100.png (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.9.2/images/ui-bg_glass_55_fbf9ee_1x400.png (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.9.2/images/ui-bg_glass_65_ffffff_1x400.png (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.9.2/images/ui-bg_glass_75_dadada_1x400.png (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.9.2/images/ui-bg_glass_75_e6e6e6_1x400.png (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.9.2/images/ui-bg_glass_95_fef1ec_1x400.png (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.9.2/images/ui-bg_highlight-soft_75_cccccc_1x100.png (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.9.2/images/ui-icons_222222_256x240.png (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.9.2/images/ui-icons_2e83ff_256x240.png (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.9.2/images/ui-icons_454545_256x240.png (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.9.2/images/ui-icons_888888_256x240.png (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.9.2/images/ui-icons_cd0a0a_256x240.png (added)
-
tags/1.85/bws_menu/css/jquery-ui-styles/1.9.2/jquery-ui.css (added)
-
tags/1.85/bws_menu/css/modal.css (added)
-
tags/1.85/bws_menu/css/style.css (added)
-
tags/1.85/bws_menu/deactivation-form.php (added)
-
tags/1.85/bws_menu/deprecated.php (added)
-
tags/1.85/bws_menu/fonts (added)
-
tags/1.85/bws_menu/fonts/bwsicons.eot (added)
-
tags/1.85/bws_menu/fonts/bwsicons.svg (added)
-
tags/1.85/bws_menu/fonts/bwsicons.ttf (added)
-
tags/1.85/bws_menu/fonts/bwsicons.woff (added)
-
tags/1.85/bws_menu/icons (added)
-
tags/1.85/bws_menu/icons/plugins (added)
-
tags/1.85/bws_menu/icons/plugins/bike-rental.png (added)
-
tags/1.85/bws_menu/icons/plugins/gpt-ai-content-creator.png (added)
-
tags/1.85/bws_menu/icons/themes (added)
-
tags/1.85/bws_menu/icons/themes/opening.png (added)
-
tags/1.85/bws_menu/icons/themes/realestate.png (added)
-
tags/1.85/bws_menu/icons/themes/rent-a-bike.png (added)
-
tags/1.85/bws_menu/icons/themes/renty.png (added)
-
tags/1.85/bws_menu/icons/themes/unity.png (added)
-
tags/1.85/bws_menu/images (added)
-
tags/1.85/bws_menu/images/affiliate-background.png (added)
-
tags/1.85/bws_menu/images/close_banner.png (added)
-
tags/1.85/bws_menu/images/earn-icon.svg (added)
-
tags/1.85/bws_menu/images/join-icon.svg (added)
-
tags/1.85/bws_menu/images/membership-background.jpg (added)
-
tags/1.85/bws_menu/images/promote-icon.svg (added)
-
tags/1.85/bws_menu/images/tooltip_icons.png (added)
-
tags/1.85/bws_menu/js (added)
-
tags/1.85/bws_menu/js/bws_menu.js (added)
-
tags/1.85/bws_menu/js/bws_tooltip.js (added)
-
tags/1.85/bws_menu/js/c_o_o_k_i_e.js (added)
-
tags/1.85/bws_menu/js/general_script.js (added)
-
tags/1.85/bws_menu/js/shortcode-button.js (added)
-
tags/1.85/bws_menu/languages (added)
-
tags/1.85/bws_menu/languages/bestwebsoft-cs_CZ.mo (added)
-
tags/1.85/bws_menu/languages/bestwebsoft-cs_CZ.po (added)
-
tags/1.85/bws_menu/languages/bestwebsoft-de_DE.mo (added)
-
tags/1.85/bws_menu/languages/bestwebsoft-de_DE.po (added)
-
tags/1.85/bws_menu/languages/bestwebsoft-es_ES.mo (added)
-
tags/1.85/bws_menu/languages/bestwebsoft-es_ES.po (added)
-
tags/1.85/bws_menu/languages/bestwebsoft-fr_FR.mo (added)
-
tags/1.85/bws_menu/languages/bestwebsoft-fr_FR.po (added)
-
tags/1.85/bws_menu/languages/bestwebsoft-id_ID.mo (added)
-
tags/1.85/bws_menu/languages/bestwebsoft-id_ID.po (added)
-
tags/1.85/bws_menu/languages/bestwebsoft-it_IT.mo (added)
-
tags/1.85/bws_menu/languages/bestwebsoft-it_IT.po (added)
-
tags/1.85/bws_menu/languages/bestwebsoft-ja.mo (added)
-
tags/1.85/bws_menu/languages/bestwebsoft-ja.po (added)
-
tags/1.85/bws_menu/languages/bestwebsoft-nl_NL.mo (added)
-
tags/1.85/bws_menu/languages/bestwebsoft-nl_NL.po (added)
-
tags/1.85/bws_menu/languages/bestwebsoft-pl_PL.mo (added)
-
tags/1.85/bws_menu/languages/bestwebsoft-pl_PL.po (added)
-
tags/1.85/bws_menu/languages/bestwebsoft-pt_BR.mo (added)
-
tags/1.85/bws_menu/languages/bestwebsoft-pt_BR.po (added)
-
tags/1.85/bws_menu/languages/bestwebsoft-ru_RU.mo (added)
-
tags/1.85/bws_menu/languages/bestwebsoft-ru_RU.po (added)
-
tags/1.85/bws_menu/languages/bestwebsoft-uk.mo (added)
-
tags/1.85/bws_menu/languages/bestwebsoft-uk.po (added)
-
tags/1.85/bws_menu/product_list.php (added)
-
tags/1.85/css (added)
-
tags/1.85/css/admin_page.css (added)
-
tags/1.85/css/gglcptch.css (added)
-
tags/1.85/css/hide_badge.css (added)
-
tags/1.85/css/login-style.css (added)
-
tags/1.85/css/style.css (added)
-
tags/1.85/google-captcha.php (added)
-
tags/1.85/includes (added)
-
tags/1.85/includes/allowlist.php (added)
-
tags/1.85/includes/captcha-for-formidable.php (added)
-
tags/1.85/includes/class-gglcptch-settings-tabs.php (added)
-
tags/1.85/includes/forms.php (added)
-
tags/1.85/includes/pro_banners.php (added)
-
tags/1.85/js (added)
-
tags/1.85/js/admin_script.js (added)
-
tags/1.85/js/pre-api-script.js (added)
-
tags/1.85/js/script.js (added)
-
tags/1.85/languages (added)
-
tags/1.85/languages/google-captcha-cs_CZ.mo (added)
-
tags/1.85/languages/google-captcha-cs_CZ.po (added)
-
tags/1.85/languages/google-captcha-de_DE.mo (added)
-
tags/1.85/languages/google-captcha-de_DE.po (added)
-
tags/1.85/languages/google-captcha-es_ES.mo (added)
-
tags/1.85/languages/google-captcha-es_ES.po (added)
-
tags/1.85/languages/google-captcha-fr_FR.mo (added)
-
tags/1.85/languages/google-captcha-fr_FR.po (added)
-
tags/1.85/languages/google-captcha-it_IT.mo (added)
-
tags/1.85/languages/google-captcha-it_IT.po (added)
-
tags/1.85/languages/google-captcha-ja.mo (added)
-
tags/1.85/languages/google-captcha-ja.po (added)
-
tags/1.85/languages/google-captcha-pt_BR.mo (added)
-
tags/1.85/languages/google-captcha-pt_BR.po (added)
-
tags/1.85/languages/google-captcha-ro_RO.mo (added)
-
tags/1.85/languages/google-captcha-ro_RO.po (added)
-
tags/1.85/languages/google-captcha-ru_RU.mo (added)
-
tags/1.85/languages/google-captcha-ru_RU.po (added)
-
tags/1.85/languages/google-captcha-tr_TR.mo (added)
-
tags/1.85/languages/google-captcha-tr_TR.po (added)
-
tags/1.85/languages/google-captcha-uk.mo (added)
-
tags/1.85/languages/google-captcha-uk.po (added)
-
tags/1.85/readme.txt (added)
-
tags/1.85/screenshot-1.png (added)
-
tags/1.85/screenshot-2.png (added)
-
tags/1.85/screenshot-3.png (added)
-
tags/1.85/screenshot-4.png (added)
-
tags/1.85/screenshot-5.png (added)
-
tags/1.85/screenshot-6.png (added)
-
tags/1.85/screenshot-7.png (added)
-
tags/1.85/screenshot-8.png (added)
-
trunk/bws_menu/bws_functions.php (modified) (1 diff)
-
trunk/google-captcha.php (modified) (4 diffs)
-
trunk/includes/class-gglcptch-settings-tabs.php (modified) (3 diffs)
-
trunk/js/admin_script.js (modified) (1 diff)
-
trunk/js/script.js (modified) (1 diff)
-
trunk/readme.txt (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
google-captcha/trunk/bws_menu/bws_functions.php
r3350451 r3414300 806 806 $jquery_ui_version = isset( $wp_scripts->registered['jquery-ui-core']->ver ) ? $wp_scripts->registered['jquery-ui-core']->ver : '1.12.1'; 807 807 WP_Filesystem(); 808 if ( ! $wp_filesystem->exists( dirname( __FILE__ ) . '/css/jquery-ui-styles/' . $jquery_ui_version . '/' ) ) {808 if ( ! empty( $wp_filesystem->link ) && ! $wp_filesystem->exists( dirname( __FILE__ ) . '/css/jquery-ui-styles/' . $jquery_ui_version . '/' ) ) { 809 809 $jquery_ui_version = '1.12.1'; 810 810 } -
google-captcha/trunk/google-captcha.php
r3350451 r3414300 7 7 Text Domain: google-captcha 8 8 Domain Path: /languages 9 Version: 1.8 49 Version: 1.85 10 10 Author URI: https://bestwebsoft.com/ 11 11 License: GPLv3 or later … … 138 138 gglcptch_add_actions(); 139 139 } 140 } 140 141 if ( isset( $gglcptch_options['hide_login'] ) && isset( $gglcptch_options['slug_login'] ) && ! empty( $gglcptch_options['slug_login'] ) ) { 142 $request_url = sanitize_url( wp_unslash( $_SERVER['REQUEST_URI'] ) ); 143 add_filter( 'site_url', 'gglcptch_check_login_url', 10, 4 ); 144 add_action( 'login_init', 'gglcptch_login_head', 10 ); 145 add_action( 'login_form', 'gglcptch_add_field' ); 146 147 add_filter( 'lostpassword_url', 'gglcptch_lostpassword', 10 ); 148 add_filter( 'lostpassword_redirect', 'gglcptch_lostpassword_redirect', 100 ); 149 150 global $pagenow; 151 if ( ( false !== strpos( $request_url, '/admin' ) || false !== strpos( $request_url, '/wp-admin' ) || false !== strpos( $request_url, '/dashboard' ) ) && 'index.php' === $pagenow ) { 152 $url = get_site_url() . '/?' . $gglcptch_options['slug_login']; 153 wp_safe_redirect( $url ); 154 exit(); 155 } 156 157 if ( false !== strpos( wp_parse_url( $request_url, PHP_URL_QUERY ), $gglcptch_options['slug_login'] ) && false === strpos( $request_url, 'wp-login.php' ) ) { 158 $pagenow = 'wp-login.php'; 159 require_once( ABSPATH . 'wp-login.php' ); 160 exit; 161 } 162 } 163 } 164 } 165 166 if ( ! function_exists( 'gglcptch_check_login_url' ) ) { 167 /** 168 * Change login URI 169 */ 170 function gglcptch_check_login_url( $url, $path, $scheme, $blog_id ) { 171 global $gglcptch_options; 172 $parsed_url = wp_parse_url( $url ); 173 174 if ( strpos( $url, 'wp-login.php' ) === false || empty( $gglcptch_options['slug_login'] ) ) { 175 return $url; 176 } 177 178 $args = explode( '?', $url ); 179 180 if ( isset( $args[1] ) ) { 181 parse_str( $args[1], $args ); 182 if ( ! array_key_exists( $gglcptch_options['slug_login'], $args ) ) { 183 $args[ $gglcptch_options['slug_login'] ] = 1; 184 } 185 $url = add_query_arg( $args, get_site_url() . '/?' . $gglcptch_options['slug_login'] ); 186 } else { 187 $url = get_site_url() . '/?' . $gglcptch_options['slug_login']; 188 } 189 return $url; 190 } 191 } 192 193 if ( ! function_exists( 'gglcptch_login_head' ) ) { 194 /** 195 * Changed for login page 196 */ 197 function gglcptch_login_head() { 198 global $gglcptch_options; 199 if ( isset( $_GET['action'] ) && ( isset( $_GET['key'] ) || 'resetpass' === sanitize_text_field( wp_unslash( $_GET['action'] ) ) || 'rp' === sanitize_text_field( $_GET['action'] ) ) ) { 200 return; 201 } 202 203 if ( isset( $_POST['redirect_slug'] ) && $gglcptch_options['slug_login'] === sanitize_text_field( wp_unslash( $_POST['redirect_slug'] ) ) ) { 204 return false; 205 } 206 207 $request_url = sanitize_url( wp_unslash( $_SERVER['REQUEST_URI'] ) ); 208 209 if ( false !== strpos( $request_url, 'action=logout' ) ) { 210 check_admin_referer( 'log-out' ); 211 wp_logout(); 212 wp_safe_redirect( home_url(), 302 ); 213 die; 214 } 215 if ( false === strpos( $request_url, $gglcptch_options['slug_login'] ) && ( false !== strpos( $request_url, 'wp-login' ) || false !== strpos( $request_url, 'login' ) ) ) { 216 wp_safe_redirect( home_url( $gglcptch_options['login_error_redirection'] ), 302 ); 217 exit(); 218 } 219 } 220 } 221 222 if ( ! function_exists( 'gglcptch_add_field' ) ) { 223 /** 224 * Add field for login form 225 */ 226 function gglcptch_add_field() { 227 global $gglcptch_options; 228 echo '<input type="hidden" name="redirect_slug" value="' . esc_attr( $gglcptch_options['slug_login'] ) . '" />'; 229 } 230 } 231 232 if ( ! function_exists( 'gglcptch_lostpassword_redirect' ) ) { 233 /** 234 * Change lost password link in email 235 */ 236 function gglcptch_lostpassword_redirect( $lostpassword_redirect ) { 237 global $gglcptch_options; 238 return 'wp-login.php?checkemail=confirm&redirect=false&' . $gglcptch_options['slug_login']; 239 } 240 } 241 242 if ( ! function_exists( 'gglcptch_lostpassword' ) ) { 243 /** 244 * Change lost password link 245 */ 246 function gglcptch_lostpassword() { 247 global $gglcptch_options; 248 return site_url( 'wp-login.php?action=lostpassword&' . $gglcptch_options['slug_login'] . '&redirect=false' ); 249 } 141 250 } 142 251 … … 512 621 'all_day' => array( 1, 2, 3, 4, 5, 6, 7 ), 513 622 'hours' => array(), 514 ); 623 'hide_login' => 0, 624 'slug_login' => '', 625 'login_error_redirection' => '404', 626 ); 515 627 516 628 if ( function_exists( 'get_editable_roles' ) ) { … … 1449 1561 add_action( 'admin_menu', 'gglcptch_admin_menu' ); 1450 1562 1451 add_action( 'init', 'gglcptch_init' );1563 add_action( 'init', 'gglcptch_init', 10 ); 1452 1564 add_action( 'admin_init', 'gglcptch_admin_init' ); 1453 1565 -
google-captcha/trunk/includes/class-gglcptch-settings-tabs.php
r3350451 r3414300 23 23 $tabs = array( 24 24 'settings' => array( 'label' => __( 'Settings', 'google-captcha' ) ), 25 'hide_login' => array( 'label' => __( 'Hide Login', 'google-captcha' ) ), 25 26 'misc' => array( 'label' => __( 'Misc', 'google-captcha' ) ), 26 27 'custom_code' => array( 'label' => __( 'Custom Code', 'google-captcha' ) ), … … 143 144 $this->options[ $role ] = isset( $_POST[ 'gglcptch_' . $role ] ) ? 1 : 0; 144 145 } 146 } 147 148 $this->options['hide_login'] = isset( $_POST['gglcptch_hide_login'] ) ? 1 : 0; 149 $new_login_slug = isset( $_POST['gglcptch_slug_login'] ) ? sanitize_text_field( wp_unslash( $_POST['gglcptch_slug_login'] ) ) : ''; 150 if ( 1 === $this->options['hide_login'] && empty( $new_login_slug ) ) { 151 $error = __( 'Cannot set Slug for Login page to home page.', 'google-captcha' ); 152 } elseif ( in_array( $new_login_slug, [ $this->options['login_error_redirection'], 'wp-admin', 'wp-login', 'wp-login.php', 'login'] ) ) { 153 $error = __( 'Cannot set login to reserved URLs or the redirection page.', 'google-captcha' ); 154 } else { 155 $this->options['slug_login'] = $new_login_slug; 156 } 157 $login_error_redirection = isset( $_POST['gglcptch_login_error_redirection'] ) ? sanitize_text_field( wp_unslash( $_POST['gglcptch_login_error_redirection'] ) ) : ''; 158 if ( in_array( $login_error_redirection, [ $this->options['slug_login'], 'wp-admin', 'wp-login', 'wp-login.php', 'login'] ) ) { 159 $error = __( 'Cannot set redirection to reserved URLs or the new login page.', 'google-captcha' ); 160 } else { 161 $this->options['login_error_redirection'] = $login_error_redirection; 145 162 } 146 163 … … 514 531 515 532 /** 533 * Displays 'hide login' menu-tab 534 * 535 * @access public 536 * @param void 537 * @return void 538 */ 539 public function tab_hide_login() { 540 global $gglcptch_languages, $wp_version, $gglcptch_options; 541 ?> 542 <h3 class="bws_tab_label"><?php esc_html_e( 'Hide Login Settings', 'google-captcha' ); ?></h3> 543 <?php $this->help_phrase(); ?> 544 <hr> 545 <table class="form-table gglcptch_settings_form"> 546 <tr valign="top"> 547 <th scope="row"> 548 <?php esc_html_e( 'Hide Login page', 'google-captcha' ); ?> 549 </th> 550 <td> 551 <input id="gglcptch_hide_login" name="gglcptch_hide_login" type="checkbox" value="1" <?php echo checked( $this->options['hide_login'] ); ?>> 552 </td> 553 </tr> 554 <tr class="gglcptch_login_slug" valign="top" <?php echo empty( $this->options['hide_login'] ) || 0 === $this->options['hide_login'] ? 'style="display:none;"' : ''; ?>> 555 <th scope="row"> 556 <?php esc_html_e( 'Slug for Login page', 'google-captcha' ); ?> 557 </th> 558 <td> 559 <input name="gglcptch_slug_login" type="text" value="<?php echo $this->options['slug_login']; ?>"> 560 <span class="bws_info" style="display: block;"><?php printf( __( 'Access to the login page will only be possible from this URL: %s', 'google-captcha' ), home_url( ! empty( $this->options['slug_login'] ) ? '?' . $this->options['slug_login'] : '?slug_page' ) ); ?></span> 561 <span class="bws_info warning" style="display: block;"><?php _e( 'The slug must be unique to the site.', 'google-captcha' ); ?></span> 562 </td> 563 </tr> 564 <tr class="gglcptch_login_slug" <?php echo empty( $this->options['hide_login'] ) || 0 === $this->options['hide_login'] ? 'style="display:none;"' : ''; ?>> 565 <th scope="row"> 566 <?php esc_html_e( 'Redirection', 'google-captcha' ); ?> 567 </th> 568 <td> 569 <input name="gglcptch_login_error_redirection" type="text" value="<?php echo $this->options['login_error_redirection']; ?>"> 570 <span class="bws_info" style="display: block;"><?php _e( 'This page shown when accessing the login page with the wrong URL, leaving it empty will redirect to the home page', 'google-captcha' ); ?></span> 571 </td> 572 573 </tr> 574 </table> 575 <?php 576 } 577 578 /** 516 579 * Display custom error\message\notice 517 580 * -
google-captcha/trunk/js/admin_script.js
r3236168 r3414300 79 79 } 80 80 } ); 81 82 /* Hide login block */ 83 $( '#gglcptch_hide_login' ).on( 'change', function() { 84 if ( $( this ).is( ':checked' ) ) { 85 $( '.gglcptch_login_slug' ).show(); 86 } else { 87 $( '.gglcptch_login_slug' ).hide(); 88 } 89 } ); 81 90 } ); 82 91 -
google-captcha/trunk/js/script.js
r3153390 r3414300 42 42 */ 43 43 if ( 'v2' == gglcptch.options.version || 'invisible' == gglcptch.options.version ) { 44 $( '.g-recaptcha' ).each( function() {45 /* reCAPTCHA will be generated into the empty block only */46 if ( $( this ).html() === '' && $( this ).text() === '' ) {47 48 /* get element`s ID */49 var container = $( this ).attr( 'id' );50 51 if ( typeof container == 'undefined' ) {52 container = get_id();53 $( this ).attr( 'id', container );54 }55 56 /* get reCapatcha parameters */57 var sitekey = $( this ).attr( 'data-sitekey' ),58 theme = $( this ).attr( 'data-theme' ),59 lang = $( this ).attr( 'data-lang' ),60 size = $( this ).attr( 'data-size' ),61 type = $( this ).attr( 'data-type' ),62 tabindex = $( this ).attr( 'data-tabindex' ),63 callback = $( this ).attr( 'data-callback' ),64 ex_call = $( this ).attr( 'data-expired-callback' ),65 stoken = $( this ).attr( 'data-stoken' ),66 params = [];67 68 params['sitekey'] = sitekey ? sitekey : gglcptch.options.sitekey;69 if ( !! theme ) {70 params['theme'] = theme;71 }72 if ( !! lang ) {73 params['lang'] = lang;74 }75 if ( !! size ) {76 params['size'] = size;77 }78 if ( !! type ) {79 params['type'] = type;80 }81 if ( !! tabindex ) {82 params['tabindex'] = tabindex;83 }84 if ( !! callback ) {85 params['callback'] = callback;86 }87 if ( !! ex_call ) {88 params['expired-callback'] = ex_call;89 }90 if ( !! stoken ) {91 params['stoken'] = stoken;92 }93 94 gglcptch.display( container, params );95 }96 } );97 98 44 /* 99 45 * count the number of reCAPTCHA blocks in the form -
google-captcha/trunk/readme.txt
r3350451 r3414300 4 4 Tags: anti-spam security, antispam, recaptcha, captcha, captha, Invisible reCaptcha, Invisible captcha, Invisibl reCaptcha, comment, cpatcha, google catcha, Invisible re captcha, recaptcha version3 5 5 Requires at least: 5.6 6 Tested up to: 6. 87 Stable tag: 1.8 46 Tested up to: 6.9 7 Stable tag: 1.85 8 8 License: GPLv3 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 52 52 * Multilingual and RTL ready 53 53 * Edit error message 54 * Hide Login page 54 55 55 56 > **Pro Features** … … 107 108 > * Configure all subsites on the network 108 109 > * Block disposable emails 110 > * Administrator Login notification 109 111 > * Get answer to your support question within one business day ([Support Policy](https://bestwebsoft.com/support-policy/)) 110 112 > … … 297 299 == Changelog == 298 300 301 = V1.85 - 08.12.2025 = 302 * Pro : The Administrator Login notification functionality has been added. 303 * NEW : The Hide Login page functionality has been added. 304 * Update : BWS Panel section was updated. 305 * Bugfix : Minor bugs fixed. 306 * Update : All functionality was updated for WordPress 6.8.3. 307 299 308 = V1.84 - 26.08.2025 = 300 309 * Pro : The Block disposable emails functionality has been added. … … 676 685 == Upgrade Notice == 677 686 687 = V1.85 = 688 * The compatibility with new WordPress version updated. 689 * New features added. 690 * Bug fixed. 691 678 692 = V1.84 = 679 693 * The compatibility with new WordPress version updated.
Note: See TracChangeset
for help on using the changeset viewer.