Created
November 6, 2022 15:49
-
-
Save yuriinalivaiko/d96d8b1c3ebdecc48f7d2200a8353525 to your computer and use it in GitHub Desktop.
Hook um_before_{$mode}_fields
This file contains 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 | |
/** | |
* Hook: um_before_{$mode}_fields | |
* | |
* Type: action | |
* | |
* Description: Fires before the form fields. | |
* May be used to display custom content before form fields or add hidden fields. | |
* | |
* @example https://github.com/ultimatemember/ultimatemember/blob/master/templates/login.php#L50 | |
* @link https://docs.ultimatemember.com/article/1071-umbeforemodefields | |
* | |
* @package um\templates | |
* @see templates/login.php | |
* @see templates/register.php | |
* @see um_profile_content_main() | |
* @since 2.0 | |
* @version 3.0 | |
* | |
* @param array $args Form shortcode arguments. | |
*/ | |
function my_before_login_fields( $args ) { | |
// your code here. | |
} | |
$mode = 'login'; | |
add_action( "um_before_{$mode}_fields", 'my_before_login_fields', 10, 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment