diff --git a/includes/core/um-actions-login.php b/includes/core/um-actions-login.php index 42cac3e0..dd1ea922 100644 --- a/includes/core/um-actions-login.php +++ b/includes/core/um-actions-login.php @@ -362,6 +362,27 @@ function um_add_submit_button_to_login( $args ) { if ( ! isset( $primary_btn_word ) || $primary_btn_word == '' ){ $primary_btn_word = UM()->options()->get( 'login_primary_btn_word' ); } + /** + * Filters the classes applied to the primary button on the login form. + * + * @hook um_login_form_primary_btn_classes + * @since 2.10.5 + * + * @param {array} $classes An array of CSS classes applied to the primary button. + * @param {array} $args An array of arguments or configurations used in the login form. + * + * @return {array} Button CSS classes. + * + * @example Extend the classes applied to the primary button on the login form. + * function my_custom_classes( $classes, $args ) { + * // Add a new class to the button + * $classes[] = 'new-button-class'; + * + * return $classes; + * } + * add_filter( 'um_login_form_primary_btn_classes', 'my_custom_classes', 10, 2 ); + */ + $primary_btn_classes = apply_filters( 'um_login_form_primary_btn_classes', array( 'um-button' ), $args ); /** * UM hook @@ -426,7 +447,7 @@ function um_add_submit_button_to_login( $args ) { if ( ! empty( $args['secondary_btn'] ) ) { ?>
- +
@@ -437,7 +458,7 @@ function um_add_submit_button_to_login( $args ) {
- +
diff --git a/includes/core/um-actions-register.php b/includes/core/um-actions-register.php index 007101e8..ca5e7540 100644 --- a/includes/core/um-actions-register.php +++ b/includes/core/um-actions-register.php @@ -597,6 +597,28 @@ function um_add_submit_button_to_register( $args ) { $primary_btn_word = UM()->options()->get( 'register_primary_btn_word' ); } + /** + * Filters the classes applied to the primary button on the registration form. + * + * @hook um_register_form_primary_btn_classes + * @since 2.10.5 + * + * @param {array} $classes An array of CSS classes applied to the primary button. + * @param {array} $args An array of arguments or configurations used in the registration form. + * + * @return {array} Button CSS classes. + * + * @example Extend the classes applied to the primary button on the registration form. + * function my_custom_classes( $classes, $args ) { + * // Add a new class to the button + * $classes[] = 'new-button-class'; + * + * return $classes; + * } + * add_filter( 'um_register_form_primary_btn_classes', 'my_custom_classes', 10, 2 ); + */ + $primary_btn_classes = apply_filters( 'um_register_form_primary_btn_classes', array( 'um-button' ), $args ); + $secondary_btn_word = $args['secondary_btn_word']; /** * UM hook @@ -656,7 +678,7 @@ function um_add_submit_button_to_register( $args ) {
- +
@@ -667,7 +689,7 @@ function um_add_submit_button_to_register( $args ) {
- +
diff --git a/templates/password-reset.php b/templates/password-reset.php index 6dcf9cb8..0984a2f7 100644 --- a/templates/password-reset.php +++ b/templates/password-reset.php @@ -6,17 +6,18 @@ * * Call: function ultimatemember_password() * - * @version 2.7.0 + * @version 2.10.5 * * @var string $mode * @var int $form_id * @var array $args + * + * phpcs:disable WordPress.Security.NonceVerification */ if ( ! defined( 'ABSPATH' ) ) { exit; } ?> -
@@ -62,19 +63,24 @@ if ( ! defined( 'ABSPATH' ) ) { */ do_action( 'um_reset_password_page_hidden_fields', $args ); - if ( ! empty( $_GET['updated'] ) ) { ?> + if ( ! empty( $_GET['updated'] ) ) { + ?>
- + } + ?>
- +
@@ -82,7 +88,8 @@ if ( ! defined( 'ABSPATH' ) ) {
- builtin()->get_specific_fields( 'username_b' ); @@ -111,18 +118,36 @@ if ( ! defined( 'ABSPATH' ) ) { * } * ?> */ - do_action( 'um_after_password_reset_fields', $args ); ?> + do_action( 'um_after_password_reset_fields', $args ); + /** + * Filters the classes applied to the primary button on the password reset form. + * + * @hook um_password_reset_form_primary_btn_classes + * @since 2.10.5 + * + * @param {array} $classes An array of CSS classes applied to the primary button. + * @param {array} $args An array of arguments or configurations used in the password reset form. + * + * @return {array} Button CSS classes. + * + * @example Extend the classes applied to the primary button on the password reset form. + * function my_custom_classes( $classes, $args ) { + * // Add a new class to the button + * $classes[] = 'new-button-class'; + * + * return $classes; + * } + * add_filter( 'um_password_reset_form_primary_btn_classes', 'my_custom_classes', 10, 2 ); + */ + $primary_btn_classes = apply_filters( 'um_password_reset_form_primary_btn_classes', array( 'um-button' ), $args ); + ?>
-
- +
-
-
-