Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into enhance/new_buil…
Browse files Browse the repository at this point in the history
…der_stage_form_builder_ui_redesign
  • Loading branch information
sapayth committed Nov 26, 2024
2 parents 21d19c2 + 9801b41 commit 87f577d
Show file tree
Hide file tree
Showing 8 changed files with 78 additions and 59 deletions.
4 changes: 4 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
= v4.0.14 (23 Nov, 2024) =
* Fix - Error in login page
* Fix - Support situations in which (WPUF) translations are loaded too early

= v4.0.13 (14 Nov, 2024) =
* Enhance - Cloudflare Turnstile field on form builder
* Enhance - Cloudflare Turnstile on login form
Expand Down
23 changes: 15 additions & 8 deletions includes/Free/Simple_Login.php
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,12 @@ public function login_form() {
private function verify_cloudflare_turnstile_on_login() {
$nonce = isset( $_POST['wpuf-login-nonce'] ) ? sanitize_key( wp_unslash( $_POST['wpuf-login-nonce'] ) ) : '';

$enable_turnstile = wpuf_get_option( 'enable_turnstile', 'wpuf_general', 'off' );

if ( 'on' !== $enable_turnstile ) {
return true;
}

if ( isset( $nonce ) && ! wp_verify_nonce( $nonce, 'wpuf_login_action' ) ) {
return false;
}
Expand Down Expand Up @@ -511,16 +517,17 @@ public function process_login() {

if ( ! $this->verify_cloudflare_turnstile_on_login() ) {
$errors = ! empty( $this->cf_messages[0] ) ? $this->cf_messages[0] : '';
$errors = implode( ', ', $errors );
$errors = is_array( $errors ) ? implode( ', ', $errors ) : $errors;

$this->login_errors[] =
sprintf(
sprintf(
// translators: %1$s and %2$s are strong tags, %3$s is the error message
__( '%1$sError%2$s: Cloudflare Turnstile verification failed. Reasons: [%3$s]', 'wp-user-frontend' ),
'<strong>',
'</strong>',
$errors
);
'<strong>' . __( 'Error', 'wp-user-frontend' ) . ':</strong> ' . __( 'Cloudflare Turnstile verification failed. Reasons: [', 'wp-user-frontend' );
__( '%1$sError%2$s: Cloudflare Turnstile verification failed. Reasons: [%3$s]', 'wp-user-frontend' ),
'<strong>',
'</strong>',
$errors
);
'<strong>' . __( 'Error', 'wp-user-frontend' ) . ':</strong> ' . __( 'Cloudflare Turnstile verification failed. Reasons: [', 'wp-user-frontend' );
}

$validation_error = new WP_Error();
Expand Down
82 changes: 41 additions & 41 deletions languages/wp-user-frontend.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# This file is distributed under the GPL2 or later.
msgid ""
msgstr ""
"Project-Id-Version: WP User Frontend 4.0.13\n"
"Project-Id-Version: WP User Frontend 4.0.14\n"
"Report-Msgid-Bugs-To: https://wedevs.com/contact/\n"
"POT-Creation-Date: 2024-11-14 05:14:46+00:00\n"
"POT-Creation-Date: 2024-11-23 04:35:17+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
Expand Down Expand Up @@ -5394,16 +5394,16 @@ msgstr ""
msgid "You are now logged out."
msgstr ""

#: includes/Free/Simple_Login.php:503
#: includes/Free/Simple_Login.php:509
msgid "Nonce is invalid"
msgstr ""

#: includes/Free/Simple_Login.php:518
#: includes/Free/Simple_Login.php:525
#. translators: %1$s and %2$s are strong tags, %3$s is the error message
msgid "%1$sError%2$s: Cloudflare Turnstile verification failed. Reasons: [%3$s]"
msgstr ""

#: includes/Free/Simple_Login.php:523 includes/Free/Simple_Login.php:564
#: includes/Free/Simple_Login.php:530 includes/Free/Simple_Login.php:571
#: includes/Frontend/Registration.php:184
#: includes/Frontend/Registration.php:191
#: includes/Frontend/Registration.php:198
Expand All @@ -5417,140 +5417,140 @@ msgstr ""
msgid "Error"
msgstr ""

#: includes/Free/Simple_Login.php:523
#: includes/Free/Simple_Login.php:530
msgid "Cloudflare Turnstile verification failed. Reasons: ["
msgstr ""

#: includes/Free/Simple_Login.php:536 includes/Frontend/Registration.php:214
#: includes/Free/Simple_Login.php:543 includes/Frontend/Registration.php:214
msgid "Username is required."
msgstr ""

#: includes/Free/Simple_Login.php:542 includes/Frontend/Registration.php:221
#: includes/Free/Simple_Login.php:549 includes/Frontend/Registration.php:221
msgid "Password is required."
msgstr ""

#: includes/Free/Simple_Login.php:549 includes/Traits/FieldableTrait.php:205
#: includes/Free/Simple_Login.php:556 includes/Traits/FieldableTrait.php:205
#: includes/class-frontend-render-form.php:877
msgid "Empty reCaptcha Field"
msgstr ""

#: includes/Free/Simple_Login.php:564 includes/Frontend/Registration.php:255
#: includes/Free/Simple_Login.php:571 includes/Frontend/Registration.php:255
msgid "A user could not be found with this email address."
msgstr ""

#: includes/Free/Simple_Login.php:759
#: includes/Free/Simple_Login.php:766
msgid "Please enter your password."
msgstr ""

#: includes/Free/Simple_Login.php:765
#: includes/Free/Simple_Login.php:772
msgid "Passwords do not match."
msgstr ""

#: includes/Free/Simple_Login.php:813
#: includes/Free/Simple_Login.php:820
msgid "Enter a username or e-mail address."
msgstr ""

#: includes/Free/Simple_Login.php:820
#: includes/Free/Simple_Login.php:827
msgid "There is no user registered with that email address."
msgstr ""

#: includes/Free/Simple_Login.php:837
#: includes/Free/Simple_Login.php:844
msgid "Invalid username or e-mail."
msgstr ""

#: includes/Free/Simple_Login.php:851
#: includes/Free/Simple_Login.php:858
msgid "Password reset is not allowed for this user"
msgstr ""

#: includes/Free/Simple_Login.php:890
#: includes/Free/Simple_Login.php:897
#. translators: %s: activation link
msgid ""
"<strong>Your account is not active.</strong><br>Please check your email for "
"activation link. <br><a href=\"%s\">Click here</a> to resend the activation "
"link"
msgstr ""

#: includes/Free/Simple_Login.php:911 includes/Free/Simple_Login.php:936
#: includes/Free/Simple_Login.php:918 includes/Free/Simple_Login.php:943
msgid "Activation URL is not valid"
msgstr ""

#: includes/Free/Simple_Login.php:922
#: includes/Free/Simple_Login.php:929
msgid "Invalid User activation url"
msgstr ""

#: includes/Free/Simple_Login.php:928
#: includes/Free/Simple_Login.php:935
msgid "User already verified"
msgstr ""

#: includes/Free/Simple_Login.php:944 includes/Free/Simple_Login.php:1020
#: includes/Free/Simple_Login.php:951 includes/Free/Simple_Login.php:1027
msgid "Your account has been activated"
msgstr ""

#: includes/Free/Simple_Login.php:947
#: includes/Free/Simple_Login.php:954
msgid ""
"Your account has been verified , but you can't login until manually "
"approved your account by an administrator."
msgstr ""

#: includes/Free/Simple_Login.php:970
#: includes/Free/Simple_Login.php:977
#. translators: %s: blogname
msgid "[%s] Your username and password info"
msgstr ""

#: includes/Free/Simple_Login.php:972 includes/Free/Simple_Login.php:1072
#: includes/Free/Simple_Login.php:979 includes/Free/Simple_Login.php:1079
#: includes/Frontend/Registration.php:291 includes/Widgets/Login_Widget.php:155
#. translators: %s: username
msgid "Username: %s"
msgstr ""

#: includes/Free/Simple_Login.php:973
#: includes/Free/Simple_Login.php:980
msgid "To set your password, visit the following address:"
msgstr ""

#: includes/Free/Simple_Login.php:1069
#: includes/Free/Simple_Login.php:1076
msgid "Someone requested that the password be reset for the following account:"
msgstr ""

#: includes/Free/Simple_Login.php:1073 includes/Widgets/Login_Widget.php:156
#: includes/Free/Simple_Login.php:1080 includes/Widgets/Login_Widget.php:156
msgid "If this was a mistake, just ignore this email and nothing will happen."
msgstr ""

#: includes/Free/Simple_Login.php:1074 includes/Widgets/Login_Widget.php:157
#: includes/Free/Simple_Login.php:1081 includes/Widgets/Login_Widget.php:157
msgid "To reset your password, visit the following address:"
msgstr ""

#: includes/Free/Simple_Login.php:1085 includes/Widgets/Login_Widget.php:162
#: includes/Free/Simple_Login.php:1092 includes/Widgets/Login_Widget.php:162
#. translators: %s: blogname
msgid "[%s] Password Reset"
msgstr ""

#: includes/Free/Simple_Login.php:1091
#: includes/Free/Simple_Login.php:1098
msgid "The e-mail could not be sent."
msgstr ""

#: includes/Free/Simple_Login.php:1091
#: includes/Free/Simple_Login.php:1098
msgid "Possible reason: your host may have disabled the mail() function."
msgstr ""

#: includes/Free/Simple_Login.php:1211
#: includes/Free/Simple_Login.php:1218
#. translators: %s: blogname
msgid "[%s] Account has been activated"
msgstr ""

#: includes/Free/Simple_Login.php:1213
#: includes/Free/Simple_Login.php:1220
#. translators: %s: username
msgid "Hi %s,"
msgstr ""

#: includes/Free/Simple_Login.php:1214
#: includes/Free/Simple_Login.php:1221
msgid "Congrats! Your account has been activated. To login visit the following url:"
msgstr ""

#: includes/Free/Simple_Login.php:1216
#: includes/Free/Simple_Login.php:1223
msgid "Thanks"
msgstr ""

#: includes/Free/Simple_Login.php:1242
#: includes/Free/Simple_Login.php:1249
msgid " Login "
msgstr ""

Expand Down Expand Up @@ -7783,23 +7783,23 @@ msgstr ""
msgid "None"
msgstr ""

#: wpuf.php:118
#: wpuf.php:115
msgid "Your installed PHP Version is: "
msgstr ""

#: wpuf.php:119
#: wpuf.php:116
msgid "The <strong>WP User Frontend</strong> plugin requires PHP version <strong>"
msgstr ""

#: wpuf.php:119
#: wpuf.php:116
msgid "</strong> or greater."
msgstr ""

#: wpuf.php:241
#: wpuf.php:238
msgid "Your WP User Frontend Pro is almost ready!"
msgstr ""

#: wpuf.php:245
#: wpuf.php:242
#. translators: 1: opening anchor tag, 2: closing anchor tag.
msgid ""
"We've pushed a major update on both <b>WP User Frontend Free</b> and <b>WP "
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wp-user-frontend",
"version": "4.0.13",
"version": "4.0.14",
"description": "A Frontend Plugin for WordPress",
"author": "Tareq Hasan",
"license": "GPL",
Expand Down
6 changes: 5 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
**Tags:** frontend post, forms, user directory, profile builder, membership
**Requires at least:** 4.0
**Tested up to:** 6.7
**Stable tag:** 4.0.13
**Stable tag:** 4.0.14
**Requires PHP:** 5.6
**License:** GPLv2
**License URL:** https://www.gnu.org/licenses/gpl-2.0.html
Expand Down Expand Up @@ -281,6 +281,10 @@ redirected to the edit page with that post id. Then you'll see the edit post for
18. Set Payment Related Options

## Changelog ##
### v4.0.14 (23 Nov, 2024) ###
* Fix - Error in login page
* Fix - Support situations in which (WPUF) translations are loaded too early

### v4.0.13 (14 Nov, 2024) ###
* Enhance - Cloudflare Turnstile field on form builder
* Enhance - Cloudflare Turnstile on login form
Expand Down
6 changes: 5 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Donate link: https://tareq.co/donate/
Tags: frontend post, forms, user directory, profile builder, membership
Requires at least: 4.0
Tested up to: 6.7
Stable tag: 4.0.13
Stable tag: 4.0.14
Requires PHP: 5.6
License: GPLv2
License URL: https://www.gnu.org/licenses/gpl-2.0.html
Expand Down Expand Up @@ -281,6 +281,10 @@ redirected to the edit page with that post id. Then you'll see the edit post for
18. Set Payment Related Options

== Changelog ==
= v4.0.14 (23 Nov, 2024) =
* Fix - Error in login page
* Fix - Support situations in which (WPUF) translations are loaded too early

= v4.0.13 (14 Nov, 2024) =
* Enhance - Cloudflare Turnstile field on form builder
* Enhance - Cloudflare Turnstile on login form
Expand Down
10 changes: 5 additions & 5 deletions wpuf.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Plugin URI: https://wordpress.org/plugins/wp-user-frontend/
Description: Create, edit, delete, manages your post, pages or custom post types from frontend. Create registration forms, frontend profile and more...
Author: weDevs
Version: 4.0.13
Version: 4.0.14
Author URI: https://wedevs.com/?utm_source=WPUF_Author_URI
License: GPL2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Expand All @@ -23,7 +23,7 @@
require_once $autoload;
}

define( 'WPUF_VERSION', '4.0.13' );
define( 'WPUF_VERSION', '4.0.14' );
define( 'WPUF_FILE', __FILE__ );
define( 'WPUF_ROOT', __DIR__ );
define( 'WPUF_ROOT_URI', plugins_url( '', __FILE__ ) );
Expand Down Expand Up @@ -84,9 +84,6 @@ public function __construct() {
$this->includes();
$this->init_hooks();

// Insight class instantiate
$this->container['tracker'] = new WeDevs\Wpuf\Lib\WeDevs_Insights( __FILE__ );

do_action( 'wpuf_loaded' );
}

Expand Down Expand Up @@ -286,6 +283,9 @@ public static function uninstall() {
*/
public function load_textdomain() {
load_plugin_textdomain( 'wp-user-frontend', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );

// Insight class instantiate
$this->container['tracker'] = new WeDevs\Wpuf\Lib\WeDevs_Insights( __FILE__ );
}

/**
Expand Down

0 comments on commit 87f577d

Please sign in to comment.