Created
September 8, 2022 13:16
-
-
Save nikitasinelnikov/6ca73a18690237c67fc2914759c3b790 to your computer and use it in GitHub Desktop.
Ultimate Member v3: Password Reset migration hooks from 'um_after_form_fields', 'um_change_password_form', 'um_reset_password_form' to new 'um_form_footer'
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Description: Fires in the form footer before closing tag in the form. | |
* This hook may be used to display custom content in the form footer. | |
* | |
* Hook: um_form_footer | |
* | |
* Type: action | |
* @package um\core | |
* @since 3.0.0 | |
* @param {array} $form_data UM Form data. | |
*/ | |
function my_form_footer( $form_data ) { | |
if ( isset( $form_data['id'] ) && 'um-lostpassword' === $form_data['id'] ) { | |
// Code for the Lost Password form footer | |
} elseif ( isset( $form_data['id'] ) && 'um-resetpass' === $form_data['id'] ) { | |
// Code for the Reset Password form footer | |
} | |
} | |
add_action( 'um_form_footer', 'my_form_footer', 10, 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment