diff --git a/CHANGELOG.txt b/CHANGELOG.txt index caabff61f..747d35b93 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,6 +1,7 @@ -= 3.2.1.2 - 20/06/2024 = += 3.2.1.2 - 24/06/2024 = * Tweak - Redirect to dashboard addons page when extensions menu is clicked. * Dev - Added filter hook to add extra section settings. +* Dev - Added filter hook for login redirection after auto login. * Fix - MultiSite db prefix query issue. * Fix - Duplicate error message for date field. * Fix - Add capability and nonce for license activation and deactivation. diff --git a/assets/css/admin-rtl.css b/assets/css/admin-rtl.css index 6ad853c45..fcee2fb7b 100644 --- a/assets/css/admin-rtl.css +++ b/assets/css/admin-rtl.css @@ -1,61 +1,61 @@ @charset "UTF-8"; -/** - * admin.scss - * General User Registration admin styles. +/** + * admin.scss + * General User Registration admin styles. */ -/** - * Imports +/** + * Imports */ -/** - * Variables +/** + * Variables */ -/** - * Grid breakpoints - * - * Define the minimum dimensions at which your layout will change, - * adapting to different screen sizes, for use in media queries. +/** + * Grid breakpoints + * + * Define the minimum dimensions at which your layout will change, + * adapting to different screen sizes, for use in media queries. **/ -/** - * Grid containers - * - * Define the maximum width of `.ur-container` for different screen sizes. - * scss-docs-start container-max-widths +/** + * Grid containers + * + * Define the maximum width of `.ur-container` for different screen sizes. + * scss-docs-start container-max-widths **/ -/** Minimum breakpoint width. Null for the smallest (first) breakpoint. - * - * >> breakpoint-min(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px)) - * 576px +/** Minimum breakpoint width. Null for the smallest (first) breakpoint. + * + * >> breakpoint-min(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px)) + * 576px **/ -/** - * Variables +/** + * Variables */ -/** - * Grid breakpoints - * - * Define the minimum dimensions at which your layout will change, - * adapting to different screen sizes, for use in media queries. +/** + * Grid breakpoints + * + * Define the minimum dimensions at which your layout will change, + * adapting to different screen sizes, for use in media queries. **/ -/** - * Grid containers - * - * Define the maximum width of `.ur-container` for different screen sizes. - * scss-docs-start container-max-widths +/** + * Grid containers + * + * Define the maximum width of `.ur-container` for different screen sizes. + * scss-docs-start container-max-widths **/ -/** - * Media of at least the minimum breakpoint width. No query for the smallest breakpoint. - * Makes the @content apply to the given breakpoint and wider. +/** + * Media of at least the minimum breakpoint width. No query for the smallest breakpoint. + * Makes the @content apply to the given breakpoint and wider. **/ -/** - * Grid system - * - * Generate semantic grid columns with these mixins. +/** + * Grid system + * + * Generate semantic grid columns with these mixins. **/ -/** - * _mixins.scss - * User Registration Mixins +/** + * _mixins.scss + * User Registration Mixins */ -/** - * Display Variations +/** + * Display Variations **/ .ur-d-none { display: none !important; } @@ -184,10 +184,10 @@ .ur-d-xxl-inline-flex { display: inline-flex !important; } } -/** - * Flex variation - * - * Custom styles for additional flex alignment options. +/** + * Flex variation + * + * Custom styles for additional flex alignment options. **/ .ur-flex-row { flex-direction: row !important; } @@ -909,9 +909,9 @@ font-weight: 500; line-height: 1.25; } -/** -* Form Field -* Set the class name for all input field +/** +* Form Field +* Set the class name for all input field **/ .ur-input, .swal2-container .user-registration-swal2-modal .swal2-input { display: block; @@ -4092,8 +4092,8 @@ .pb-0 { padding-bottom: 0px; } -/** - * Container +/** + * Container **/ .ur-container, .ur-container-full, @@ -4148,8 +4148,8 @@ .ur-container, .ur-container-sm, .ur-container-md, .ur-container-lg, .ur-container-xl, .ur-container-xxl { max-width: 1320px; } } -/** - * Row +/** + * Row **/ .ur-row { display: flex; @@ -4157,8 +4157,8 @@ margin-left: -12px; margin-right: -12px; } -/** - * Columns +/** + * Columns **/ .ur-col-1, .ur-col-2, .ur-col-3, .ur-col-4, .ur-col-5, .ur-col-6, .ur-col-7, .ur-col-8, .ur-col-9, .ur-col-10, .ur-col-11, .ur-col-12, .ur-col, .ur-col-auto, .ur-col-sm-1, .ur-col-sm-2, .ur-col-sm-3, .ur-col-sm-4, .ur-col-sm-5, .ur-col-sm-6, .ur-col-sm-7, .ur-col-sm-8, .ur-col-sm-9, .ur-col-sm-10, .ur-col-sm-11, .ur-col-sm-12, .ur-col-sm, @@ -5183,8 +5183,8 @@ visibility: visible; opacity: 1; } -/** -* Keyframe animation +/** +* Keyframe animation */ @keyframes spin { 100% { @@ -5231,8 +5231,8 @@ opacity: 0; transform: scale(0.9); } } -/** - * Styling begins +/** + * Styling begins */ .blockUI.blockOverlay::before { width: 16px; @@ -5278,8 +5278,8 @@ background: url("../images/icons/loader.svg") center center; background-size: cover; } -/** - * Toggle class. +/** + * Toggle class. */ .userregistration-forms-hidden { display: block; } @@ -5345,8 +5345,8 @@ padding: 5px 10px; text-align: center; } -/** - * Addons page +/** + * Addons page **/ .ur_addons_wrap p.refresh { margin: 0 0 2em; } @@ -5427,8 +5427,8 @@ .wrap.user-registration div.error { margin-top: 10px; } -/** - * Form Builder Styles +/** + * Form Builder Styles **/ .user-registration_page_add-new-registration #wpfooter, .toplevel_page_user-registration #wpfooter { display: none; } @@ -5538,8 +5538,8 @@ margin-bottom: 5px; vertical-align: middle; } -/** - * Backbone modal dialog +/** + * Backbone modal dialog */ .ur-backbone-modal * { box-sizing: border-box; } @@ -5974,7 +5974,7 @@ cursor: pointer; font-size: 15px; } .ur-registered-from .ur-registered-inputs .ur-tabs .ur-tab-lists li a:focus { - box-shadow: 0 0 0 0px transparent, 0 0 0px 0px transparent; } + box-shadow: 0 0 0 0px transparent, 0 0 0px 0px transparent; } .ur-registered-from .ur-registered-inputs .ur-tabs .ur-tab-lists li a.active { background-color: #ffffff; color: #475bb2; @@ -6669,8 +6669,8 @@ max-width: 27%; flex: 1 0 27%; } -/** - * Tooltips +/** + * Tooltips */ .tips { cursor: help; @@ -6724,8 +6724,8 @@ img.tips { .tooltipster-base.ur-selling-price-tooltip .tooltipster-arrow .tooltipster-arrow-uncropped .tooltipster-arrow-background { border-top-color: #f44949 !important; } -/** - * Help Tip +/** + * Help Tip */ .user-registration-help-tip, .ur-portal-tooltip { @@ -6776,12 +6776,12 @@ img.tips { #profile-page form#your-profile .flatpickr-input[readonly] { background-color: #ffffff; } -/** - * Fullscreen Mode +/** + * Fullscreen Mode **/ body { - /** - * User Registration Builder Loading + /** + * User Registration Builder Loading **/ } body.ur-full-screen-mode { margin-top: -32px; } @@ -7724,7 +7724,7 @@ a.button.ur-smart-tags-list-button { .ur-registered-from .ur-builder-wrapper #ur-field-settings #ur-field-all-settings .form-row select { background-image: linear-gradient(-45deg, transparent 50%, gray 50%), linear-gradient(-135deg, gray 50%, transparent 50%); background-position: calc(100% - (100% - 15px)) calc(1em + 2px), calc(100% - (100% - 10px)) calc(1em + 2px), calc(100% - (100% - 2.5em)) 0.5em; - background-size: 5px 5px, 5px 5px, 1px 1.5em; + background-size: 5px 5px, 5px 5px, 1px 1.5em; background-repeat: no-repeat; } .ur-registered-from .ur-builder-wrapper #ur-field-settings #ur-field-all-settings .form-row .ur-radio-group-list { display: flex; diff --git a/assets/css/admin.css b/assets/css/admin.css index 873b02437..9884f8584 100644 --- a/assets/css/admin.css +++ b/assets/css/admin.css @@ -1,61 +1,61 @@ @charset "UTF-8"; -/** - * admin.scss - * General User Registration admin styles. +/** + * admin.scss + * General User Registration admin styles. */ -/** - * Imports +/** + * Imports */ -/** - * Variables +/** + * Variables */ -/** - * Grid breakpoints - * - * Define the minimum dimensions at which your layout will change, - * adapting to different screen sizes, for use in media queries. +/** + * Grid breakpoints + * + * Define the minimum dimensions at which your layout will change, + * adapting to different screen sizes, for use in media queries. **/ -/** - * Grid containers - * - * Define the maximum width of `.ur-container` for different screen sizes. - * scss-docs-start container-max-widths +/** + * Grid containers + * + * Define the maximum width of `.ur-container` for different screen sizes. + * scss-docs-start container-max-widths **/ -/** Minimum breakpoint width. Null for the smallest (first) breakpoint. - * - * >> breakpoint-min(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px)) - * 576px +/** Minimum breakpoint width. Null for the smallest (first) breakpoint. + * + * >> breakpoint-min(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px)) + * 576px **/ -/** - * Variables +/** + * Variables */ -/** - * Grid breakpoints - * - * Define the minimum dimensions at which your layout will change, - * adapting to different screen sizes, for use in media queries. +/** + * Grid breakpoints + * + * Define the minimum dimensions at which your layout will change, + * adapting to different screen sizes, for use in media queries. **/ -/** - * Grid containers - * - * Define the maximum width of `.ur-container` for different screen sizes. - * scss-docs-start container-max-widths +/** + * Grid containers + * + * Define the maximum width of `.ur-container` for different screen sizes. + * scss-docs-start container-max-widths **/ -/** - * Media of at least the minimum breakpoint width. No query for the smallest breakpoint. - * Makes the @content apply to the given breakpoint and wider. +/** + * Media of at least the minimum breakpoint width. No query for the smallest breakpoint. + * Makes the @content apply to the given breakpoint and wider. **/ -/** - * Grid system - * - * Generate semantic grid columns with these mixins. +/** + * Grid system + * + * Generate semantic grid columns with these mixins. **/ -/** - * _mixins.scss - * User Registration Mixins +/** + * _mixins.scss + * User Registration Mixins */ -/** - * Display Variations +/** + * Display Variations **/ .ur-d-none { display: none !important; } @@ -184,10 +184,10 @@ .ur-d-xxl-inline-flex { display: inline-flex !important; } } -/** - * Flex variation - * - * Custom styles for additional flex alignment options. +/** + * Flex variation + * + * Custom styles for additional flex alignment options. **/ .ur-flex-row { flex-direction: row !important; } @@ -909,9 +909,9 @@ font-weight: 500; line-height: 1.25; } -/** -* Form Field -* Set the class name for all input field +/** +* Form Field +* Set the class name for all input field **/ .ur-input, .swal2-container .user-registration-swal2-modal .swal2-input { display: block; @@ -4092,8 +4092,8 @@ .pb-0 { padding-bottom: 0px; } -/** - * Container +/** + * Container **/ .ur-container, .ur-container-full, @@ -4148,8 +4148,8 @@ .ur-container, .ur-container-sm, .ur-container-md, .ur-container-lg, .ur-container-xl, .ur-container-xxl { max-width: 1320px; } } -/** - * Row +/** + * Row **/ .ur-row { display: flex; @@ -4157,8 +4157,8 @@ margin-right: -12px; margin-left: -12px; } -/** - * Columns +/** + * Columns **/ .ur-col-1, .ur-col-2, .ur-col-3, .ur-col-4, .ur-col-5, .ur-col-6, .ur-col-7, .ur-col-8, .ur-col-9, .ur-col-10, .ur-col-11, .ur-col-12, .ur-col, .ur-col-auto, .ur-col-sm-1, .ur-col-sm-2, .ur-col-sm-3, .ur-col-sm-4, .ur-col-sm-5, .ur-col-sm-6, .ur-col-sm-7, .ur-col-sm-8, .ur-col-sm-9, .ur-col-sm-10, .ur-col-sm-11, .ur-col-sm-12, .ur-col-sm, @@ -5183,8 +5183,8 @@ visibility: visible; opacity: 1; } -/** -* Keyframe animation +/** +* Keyframe animation */ @keyframes spin { 100% { @@ -5231,8 +5231,8 @@ opacity: 0; transform: scale(0.9); } } -/** - * Styling begins +/** + * Styling begins */ .blockUI.blockOverlay::before { width: 16px; @@ -5278,8 +5278,8 @@ background: url("../images/icons/loader.svg") center center; background-size: cover; } -/** - * Toggle class. +/** + * Toggle class. */ .userregistration-forms-hidden { display: block; } @@ -5345,8 +5345,8 @@ padding: 5px 10px; text-align: center; } -/** - * Addons page +/** + * Addons page **/ .ur_addons_wrap p.refresh { margin: 0 0 2em; } @@ -5427,8 +5427,8 @@ .wrap.user-registration div.error { margin-top: 10px; } -/** - * Form Builder Styles +/** + * Form Builder Styles **/ .user-registration_page_add-new-registration #wpfooter, .toplevel_page_user-registration #wpfooter { display: none; } @@ -5538,8 +5538,8 @@ margin-bottom: 5px; vertical-align: middle; } -/** - * Backbone modal dialog +/** + * Backbone modal dialog */ .ur-backbone-modal * { box-sizing: border-box; } @@ -5974,7 +5974,7 @@ cursor: pointer; font-size: 15px; } .ur-registered-from .ur-registered-inputs .ur-tabs .ur-tab-lists li a:focus { - box-shadow: 0 0 0 0px transparent, 0 0 0px 0px transparent; } + box-shadow: 0 0 0 0px transparent, 0 0 0px 0px transparent; } .ur-registered-from .ur-registered-inputs .ur-tabs .ur-tab-lists li a.active { background-color: #ffffff; color: #475bb2; @@ -6669,8 +6669,8 @@ max-width: 27%; flex: 1 0 27%; } -/** - * Tooltips +/** + * Tooltips */ .tips { cursor: help; @@ -6724,8 +6724,8 @@ img.tips { .tooltipster-base.ur-selling-price-tooltip .tooltipster-arrow .tooltipster-arrow-uncropped .tooltipster-arrow-background { border-top-color: #f44949 !important; } -/** - * Help Tip +/** + * Help Tip */ .user-registration-help-tip, .ur-portal-tooltip { @@ -6776,12 +6776,12 @@ img.tips { #profile-page form#your-profile .flatpickr-input[readonly] { background-color: #ffffff; } -/** - * Fullscreen Mode +/** + * Fullscreen Mode **/ body { - /** - * User Registration Builder Loading + /** + * User Registration Builder Loading **/ } body.ur-full-screen-mode { margin-top: -32px; } @@ -7724,7 +7724,7 @@ a.button.ur-smart-tags-list-button { .ur-registered-from .ur-builder-wrapper #ur-field-settings #ur-field-all-settings .form-row select { background-image: linear-gradient(45deg, transparent 50%, gray 50%), linear-gradient(135deg, gray 50%, transparent 50%); background-position: calc(100% - 15px) calc(1em + 2px), calc(100% - 10px) calc(1em + 2px), calc(100% - 2.5em) 0.5em; - background-size: 5px 5px, 5px 5px, 1px 1.5em; + background-size: 5px 5px, 5px 5px, 1px 1.5em; background-repeat: no-repeat; } .ur-registered-from .ur-builder-wrapper #ur-field-settings #ur-field-all-settings .form-row .ur-radio-group-list { display: flex; diff --git a/includes/class-ur-email-confirmation.php b/includes/class-ur-email-confirmation.php index 63ccab49f..8096e4af7 100644 --- a/includes/class-ur-email-confirmation.php +++ b/includes/class-ur-email-confirmation.php @@ -269,11 +269,11 @@ public function check_token_before_authenticate() { add_filter( 'user_registration_login_form_before_notice', array( $this, 'custom_email_confirmed_admin_await_message' ) ); } else { $allow_automatic_user_login = apply_filters( 'user_registration_allow_automatic_user_login_email_confirmation', true ); + add_filter( 'login_message', array( $this, 'custom_registration_message' ) ); + add_filter( 'user_registration_login_form_before_notice', array( $this, 'custom_registration_message' ) ); if ( $allow_automatic_user_login ) { ur_automatic_user_login( $user ); } - add_filter( 'login_message', array( $this, 'custom_registration_message' ) ); - add_filter( 'user_registration_login_form_before_notice', array( $this, 'custom_registration_message' ) ); } } } else { diff --git a/includes/functions-ur-core.php b/includes/functions-ur-core.php index de8a57473..a5e9b3832 100644 --- a/includes/functions-ur-core.php +++ b/includes/functions-ur-core.php @@ -4678,7 +4678,15 @@ function ur_automatic_user_login( $user ) { $remember = apply_filters( 'user_registration_autologin_remember_user', false ); wp_set_auth_cookie( $user->id, $remember ); - wp_redirect( ur_get_my_account_url() ); + /** + * Filters the login redirection. + * + * @param string $redirect The original redirect URL after successful login. + * @param WP_User $user The user object representing the newly registered user. + */ + $redirect = apply_filters( 'user_registration_login_redirect', ur_get_my_account_url(), $user ); + + wp_redirect( $redirect ); } } diff --git a/languages/user-registration.pot b/languages/user-registration.pot index 80112c0c9..f3808c4fc 100644 --- a/languages/user-registration.pot +++ b/languages/user-registration.pot @@ -9,7 +9,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2024-06-20T04:32:35+00:00\n" +"POT-Creation-Date: 2024-06-24T03:08:12+00:00\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "X-Generator: WP-CLI 2.10.0\n" "X-Domain: user-registration\n" diff --git a/readme.txt b/readme.txt index 2bf4ea455..1509a7c29 100644 --- a/readme.txt +++ b/readme.txt @@ -238,9 +238,10 @@ We are ready to assist you! You can contact us through the WordPress.org help fo == Changelog == -= 3.2.1.2 - 20/06/2024 = += 3.2.1.2 - 24/06/2024 = * Tweak - Redirect to dashboard addons page when extensions menu is clicked. * Dev - Added filter hook to add extra section settings. +* Dev - Added filter hook for login redirection after auto login. * Fix - MultiSite db prefix query issue. * Fix - Duplicate error message for date field. * Fix - Add capability and nonce for license activation and deactivation.