Changeset 2928979
- Timestamp:
- 06/21/2023 06:54:59 AM (3 years ago)
- Location:
- smart-captcha-yandex
- Files:
-
- 30 added
- 4 edited
-
tags/1.0.1 (added)
-
tags/1.0.1/admin (added)
-
tags/1.0.1/admin/assets (added)
-
tags/1.0.1/admin/assets/css (added)
-
tags/1.0.1/admin/assets/js (added)
-
tags/1.0.1/admin/boot.php (added)
-
tags/1.0.1/admin/includes (added)
-
tags/1.0.1/admin/includes/base (added)
-
tags/1.0.1/admin/includes/base/class.page-base.php (added)
-
tags/1.0.1/admin/includes/base/class.page-settings-base.php (added)
-
tags/1.0.1/admin/pages (added)
-
tags/1.0.1/admin/pages/class.page-main.php (added)
-
tags/1.0.1/admin/pages/class.page-settings.php (added)
-
tags/1.0.1/assets (added)
-
tags/1.0.1/assets/script.js (added)
-
tags/1.0.1/includes (added)
-
tags/1.0.1/includes/base (added)
-
tags/1.0.1/includes/base/class.plugin-base.php (added)
-
tags/1.0.1/includes/boot.php (added)
-
tags/1.0.1/includes/class.auth-form-captcha.php (added)
-
tags/1.0.1/includes/class.comments-form-captcha.php (added)
-
tags/1.0.1/includes/class.plugin.php (added)
-
tags/1.0.1/includes/class.register-form-captcha.php (added)
-
tags/1.0.1/includes/functions.php (added)
-
tags/1.0.1/languages (added)
-
tags/1.0.1/readme.txt (added)
-
tags/1.0.1/smart-captcha-yandex.php (added)
-
tags/1.0.1/templates (added)
-
tags/1.0.1/templates/admin (added)
-
tags/1.0.1/templates/admin/settings-page.php (added)
-
trunk/admin/includes/base/class.page-base.php (modified) (1 diff)
-
trunk/includes/class.auth-form-captcha.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/smart-captcha-yandex.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
smart-captcha-yandex/trunk/admin/includes/base/class.page-base.php
r2768162 r2928979 49 49 $this, 50 50 'page_action', 51 ], $this->page_menu_ dashicon, $this->page_menu_position );51 ], $this->page_menu_position ); 52 52 } 53 53 -
smart-captcha-yandex/trunk/includes/class.auth-form-captcha.php
r2768162 r2928979 62 62 } 63 63 64 // Bail if a rest request. 65 if ( $this->is_rest_request() ) { 66 return $user; 67 } 68 69 // Bail if a rest request. 70 if ( str_contains( $_SERVER['REQUEST_URI'], 'xmlrpc.php' ) ) { 71 return $user; 72 } 73 64 74 if ( isset( $_POST['smart-token'] ) ) { 65 75 if ( wysc_check_smart_captcha( $_POST['smart-token'] ) ) { … … 70 80 return new WP_Error( 'wysc_spam_check_failed', esc_html__( 'Ошибка авторизации. Введите капчу', 'smart-captcha-yandex' ) ); 71 81 } 82 83 /** 84 * Checks if the current authentication request is RESTy or a custom URL where it should not load. 85 * 86 * @return boolean - Was a rest request? 87 */ 88 public function is_rest_request() { 89 if ( defined( 'REST_REQUEST' ) && REST_REQUEST || isset( $_GET['rest_route'] ) && strpos( sanitize_text_field( wp_unslash( $_GET['rest_route'] ) ), '/', 0 ) === 0 ) { 90 return true; 91 } 92 93 global $wp_rewrite; 94 if ( null === $wp_rewrite ) { 95 $wp_rewrite = new \WP_Rewrite(); 96 } 97 98 $rest_url = wp_parse_url( trailingslashit( rest_url() ) ); 99 $current_url = wp_parse_url( add_query_arg( [] ) ); 100 $is_rest = strpos( $current_url['path'], $rest_url['path'], 0 ) === 0; 101 102 return $is_rest; 103 } 72 104 } -
smart-captcha-yandex/trunk/readme.txt
r2768173 r2928979 37 37 == Changelog == 38 38 39 = 1.0.2 = 40 * Небольшие исправления 41 39 42 = 1.0.0 = 40 43 * Первая версия с базовой интеграцией -
smart-captcha-yandex/trunk/smart-captcha-yandex.php
r2768162 r2928979 3 3 * Plugin Name: Smart Captcha Yandex 4 4 * Description: WordPress integration for Yandex Smart Captcha 5 * Version: 1.0. 05 * Version: 1.0.1 6 6 * Author: Webtemyk <[email protected]> 7 7 * Author URI: https://temyk.ru
Note: See TracChangeset
for help on using the changeset viewer.