Skip to content

Instantly share code, notes, and snippets.

@yuriinalivaiko
Last active November 6, 2022 15:53
Show Gist options
  • Select an option

  • Save yuriinalivaiko/0e536afe7224967d131da2f7cc0d3ff9 to your computer and use it in GitHub Desktop.

Select an option

Save yuriinalivaiko/0e536afe7224967d131da2f7cc0d3ff9 to your computer and use it in GitHub Desktop.
Hook um_main_{$mode}_fields
<?php
/**
* Hook: um_main_{$mode}_fields
*
* Type: action
*
* Description: Fires before rendering main form fields.
*
* @example https://github.com/ultimatemember/ultimatemember/blob/master/templates/login.php#L71
* @link https://docs.ultimatemember.com/article/1171-ummainmodefields
*
* @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_main_login_fields( $args ) {
// your code here.
}
$mode = 'login';
add_action( "um_main_{$mode}_fields", 'my_main_login_fields', 10, 1 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment