Skip to content

Instantly share code, notes, and snippets.

@yuriinalivaiko
Created November 6, 2022 16:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yuriinalivaiko/e0f9c6a4c60b3d6af5ba234e43e2f048 to your computer and use it in GitHub Desktop.
Save yuriinalivaiko/e0f9c6a4c60b3d6af5ba234e43e2f048 to your computer and use it in GitHub Desktop.
Hook um_after_{$mode}_fields
<?php
/**
* Hook: um_after_{$mode}_fields
*
* Type: action
*
* Description: Fires after the form fields.
* May be used to display custom content after form fields or add hidden fields.
*
* @example https://github.com/ultimatemember/ultimatemember/blob/master/templates/login.php#L113
* @link https://docs.ultimatemember.com/article/1040-umaftermodefields
*
* @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_after_login_fields( $args ) {
// your code here.
}
$mode = 'login';
add_action( "um_after_{$mode}_fields", 'my_after_login_fields', 10, 1 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment