Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: required asterisk on password label #1481

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion assets/css/frontend-forms.css
Original file line number Diff line number Diff line change
Expand Up @@ -1835,7 +1835,7 @@ body .wpuf-attachment-upload-filelist + .moxie-shim {
}
img.wpuf-eye {
position: absolute;
right: 0;
right: 1rem;
top: 50%;
transform: translateY(-50%) translateX(-6%);
}
2 changes: 1 addition & 1 deletion assets/less/frontend-forms.less
Original file line number Diff line number Diff line change
Expand Up @@ -2124,7 +2124,7 @@ ul.wpuf-form{

img.wpuf-eye {
position: absolute;
right: 0;
right: 1rem;
top: 50%;
transform: translateY(-50%) translateX(-6%);
}
4 changes: 3 additions & 1 deletion includes/Admin/Forms/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,9 @@
return [ $user_can_post, $info ];
}

$has_post_count = $current_user->subscription()->has_post_count( $form_settings['post_type'] );
$post_type = ! empty( $form_settings['post_type'] ) ? $form_settings['post_type'] : 'post';

$has_post_count = $current_user->subscription()->has_post_count( $post_type );

if ( $current_user->subscription()->current_pack_id() && ! $has_post_count ) {
$user_can_post = 'no';
Expand All @@ -190,39 +192,39 @@

return [ $user_can_post, $info ];
}

Check failure on line 195 in includes/Admin/Forms/Form.php

View workflow job for this annotation

GitHub Actions / Run PHPCS inspection

Functions must not contain multiple empty lines in a row; found 2 empty lines

if ( $this->is_charging_enabled() ) {
$pay_per_post = $this->is_enabled_pay_per_post();

Check warning on line 198 in includes/Admin/Forms/Form.php

View workflow job for this annotation

GitHub Actions / Run PHPCS inspection

Equals sign not aligned correctly; expected 1 space but found 6 spaces
// $pay_per_post_cost = (float) $this->get_pay_per_post_cost();

Check warning on line 199 in includes/Admin/Forms/Form.php

View workflow job for this annotation

GitHub Actions / Run PHPCS inspection

This comment is 67% valid code; is this commented out code?
$force_pack = $this->is_enabled_force_pack();
$fallback_enabled = $this->is_enabled_fallback_cost();
// $fallback_cost = $this->get_subs_fallback_cost();

Check warning on line 202 in includes/Admin/Forms/Form.php

View workflow job for this annotation

GitHub Actions / Run PHPCS inspection

This comment is 70% valid code; is this commented out code?

// guest post payment checking
if ( ! is_user_logged_in() && isset( $form_settings['guest_post'] ) && $form_settings['guest_post'] === 'true' ) {

//if ( $form->is_charging_enabled() ) {

Check warning on line 207 in includes/Admin/Forms/Form.php

View workflow job for this annotation

GitHub Actions / Run PHPCS inspection

This comment is 62% valid code; is this commented out code?

if ( $force_pack ) {
$user_can_post = 'no';
$pack_page = get_permalink( wpuf_get_option( 'subscription_page',

Check failure on line 211 in includes/Admin/Forms/Form.php

View workflow job for this annotation

GitHub Actions / Run PHPCS inspection

Opening parenthesis of a multi-line function call must be the last content on the line

Check failure on line 211 in includes/Admin/Forms/Form.php

View workflow job for this annotation

GitHub Actions / Run PHPCS inspection

Opening parenthesis of a multi-line function call must be the last content on the line
'wpuf_payment' ) );

Check warning on line 212 in includes/Admin/Forms/Form.php

View workflow job for this annotation

GitHub Actions / Run PHPCS inspection

Found precision alignment of 1 spaces.

Check failure on line 212 in includes/Admin/Forms/Form.php

View workflow job for this annotation

GitHub Actions / Run PHPCS inspection

Multi-line function call not indented correctly; expected 20 spaces but found 69

Check failure on line 212 in includes/Admin/Forms/Form.php

View workflow job for this annotation

GitHub Actions / Run PHPCS inspection

Multi-line function call not indented correctly; expected 20 spaces but found 69

Check failure on line 212 in includes/Admin/Forms/Form.php

View workflow job for this annotation

GitHub Actions / Run PHPCS inspection

Closing parenthesis of a multi-line function call must be on a line by itself

Check failure on line 212 in includes/Admin/Forms/Form.php

View workflow job for this annotation

GitHub Actions / Run PHPCS inspection

Closing parenthesis of a multi-line function call must be on a line by itself
/* translators: %s: Pack page link */
$info = sprintf( __( 'You need to <a href="%s">purchase a subscription package</a> to post in this form', 'wp-user-frontend' ), $pack_page );

Check warning on line 214 in includes/Admin/Forms/Form.php

View workflow job for this annotation

GitHub Actions / Run PHPCS inspection

Equals sign not aligned correctly; expected 1 space but found 10 spaces
} elseif ( $pay_per_post && ! $force_pack ) {
$user_can_post = 'yes';
// $info = sprintf( __( 'There is a <strong>%s</strong> charge to add a new post.', 'wpuf' ), wpuf_format_price( $pay_per_post_cost ));

Check warning on line 217 in includes/Admin/Forms/Form.php

View workflow job for this annotation

GitHub Actions / Run PHPCS inspection

This comment is 50% valid code; is this commented out code?
// echo '<div class="wpuf-info">' . apply_filters( 'wpuf_ppp_notice', $info, $id, $form_settings ) . '</div>';
} else {
$user_can_post = 'no';
$info = sprintf( __( 'Payment type not selected for this form. Please contact admin.', 'wp-user-frontend' ) );
}

// } else {

Check warning on line 224 in includes/Admin/Forms/Form.php

View workflow job for this annotation

GitHub Actions / Run PHPCS inspection

This comment is 50% valid code; is this commented out code?
// $user_can_post = 'yes';
// }
} else {

Check failure on line 227 in includes/Admin/Forms/Form.php

View workflow job for this annotation

GitHub Actions / Run PHPCS inspection

If control structure block found as the only statement within an "else" block. Use elseif instead.
// regular payment checking
if ( $force_pack && is_user_logged_in() ) {
$current_pack = $current_user->subscription()->current_pack();
Expand All @@ -231,7 +233,7 @@
// user has valid post count
if ( $has_post_count ) {
$user_can_post = 'yes';
} else {

Check failure on line 236 in includes/Admin/Forms/Form.php

View workflow job for this annotation

GitHub Actions / Run PHPCS inspection

If control structure block found as the only statement within an "else" block. Use elseif instead.
if ( $fallback_enabled && ! $has_post_count ) {
$user_can_post = 'yes';
} else {
Expand All @@ -245,7 +247,7 @@
}
} elseif ( $pay_per_post && is_user_logged_in() && ! $current_user->subscription()->has_post_count( $form_settings['post_type'] ) ) {
$user_can_post = 'yes';
// $info = sprintf( __( 'There is a <strong>%s</strong> charge to add a new post.', 'wpuf' ), wpuf_format_price( $pay_per_post_cost ));

Check warning on line 250 in includes/Admin/Forms/Form.php

View workflow job for this annotation

GitHub Actions / Run PHPCS inspection

This comment is 50% valid code; is this commented out code?
// echo '<div class="wpuf-info">' . apply_filters( 'wpuf_ppp_notice', $info, $id, $form_settings ) . '</div>';
} elseif ( ! $pay_per_post && ! $current_user->subscription()->has_post_count( $form_settings['post_type'] ) ) {
$user_can_post = 'no';
Expand All @@ -260,7 +262,7 @@
}
}
}
} else {

Check failure on line 265 in includes/Admin/Forms/Form.php

View workflow job for this annotation

GitHub Actions / Run PHPCS inspection

If control structure block found as the only statement within an "else" block. Use elseif instead.
if ( isset( $form_settings['guest_post'] ) && $form_settings['guest_post'] === 'true' && !
is_user_logged_in() ) {
$user_can_post = 'yes';
Expand Down Expand Up @@ -366,7 +368,7 @@
$field['recaptcha_theme'] = isset( $field['recaptcha_theme'] ) ? $field['recaptcha_theme'] : 'light';
}

// $form_fields[] = apply_filters( 'wpuf-get-form-field', $field );

Check warning on line 371 in includes/Admin/Forms/Form.php

View workflow job for this annotation

GitHub Actions / Run PHPCS inspection

This comment is 63% valid code; is this commented out code?

$form_fields[] = apply_filters( 'wpuf-get-form-fields', $field );
}
Expand Down
12 changes: 6 additions & 6 deletions languages/wp-user-frontend.pot
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WP User Frontend 4.0.11\n"
"Report-Msgid-Bugs-To: https://wedevs.com/contact/\n"
"POT-Creation-Date: 2024-09-17 06:55:34+00:00\n"
"POT-Creation-Date: 2024-09-17 09:28:09+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 @@ -1332,7 +1332,7 @@ msgstr ""
#: admin/template.php:185 includes/Admin/Forms/Admin_Template.php:212
#: includes/Fields/Field_Contract.php:687
#: includes/Fields/Form_Field_Textarea.php:12
#: includes/Fields/Form_Field_Textarea.php:125
#: includes/Fields/Form_Field_Textarea.php:132
msgid "Textarea"
msgstr ""

Expand Down Expand Up @@ -2596,19 +2596,19 @@ msgstr ""
msgid "Others"
msgstr ""

#: includes/Admin/Forms/Form.php:189 includes/Admin/Forms/Form.php:239
#: includes/Admin/Forms/Form.php:191 includes/Admin/Forms/Form.php:241
msgid "Post Limit Exceeded for your purchased subscription pack."
msgstr ""

#: includes/Admin/Forms/Form.php:212
#: includes/Admin/Forms/Form.php:214
#. translators: %s: Pack page link
msgid ""
"You need to <a href=\"%s\">purchase a subscription package</a> to post in "
"this form"
msgstr ""

#: includes/Admin/Forms/Form.php:219 includes/Admin/Forms/Form.php:252
#: includes/Admin/Forms/Form.php:259
#: includes/Admin/Forms/Form.php:221 includes/Admin/Forms/Form.php:254
#: includes/Admin/Forms/Form.php:261
msgid "Payment type not selected for this form. Please contact admin."
msgstr ""

Expand Down
Loading