um_add_submit_button_to_login

The Ultimate Member um add submit button to login function.

Description

um_add_submit_button_to_login( $args ); 

Parameters (1)

0. $args
The args.

Usage

  1. if ( !function_exists( 'um_add_submit_button_to_login' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'ultimate-member/core/um-actions-login.php'; 
  3.  
  4. // The args. 
  5. $args = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = um_add_submit_button_to_login($args); 
  9.  

Defined (1)

The function is defined in the following location(s).

/core/um-actions-login.php  
  1. function um_add_submit_button_to_login($args) { 
  2. global $ultimatemember; 
  3.  
  4. // DO NOT add when reviewing user's details 
  5. if ( $ultimatemember->user->preview == true && is_admin() ) return; 
  6.  
  7. $primary_btn_word = $args['primary_btn_word']; 
  8. $primary_btn_word = apply_filters('um_login_form_button_one', $primary_btn_word, $args ); 
  9.  
  10. $secondary_btn_word = $args['secondary_btn_word']; 
  11. $secondary_btn_word = apply_filters('um_login_form_button_two', $secondary_btn_word, $args ); 
  12.  
  13. $secondary_btn_url = ( isset( $args['secondary_btn_url'] ) && $args['secondary_btn_url'] ) ? $args['secondary_btn_url'] : um_get_core_page('register'); 
  14. $secondary_btn_url = apply_filters('um_login_form_button_two_url', $secondary_btn_url, $args ); 
  15.  
  16. ?> 
  17.  
  18. <div class="um-col-alt"> 
  19.  
  20. <?php if ( isset( $args['show_rememberme'] ) && $args['show_rememberme'] ) { 
  21. echo $ultimatemember->fields->checkbox('rememberme', __('Keep me signed in', 'ultimatemember') ); 
  22. echo '<div class="um-clear"></div>'; 
  23. } ?> 
  24.  
  25. <?php if ( isset($args['secondary_btn']) && $args['secondary_btn'] != 0 ) { ?> 
  26.  
  27. <div class="um-left um-half"><input type="submit" value="<?php echo __( $primary_btn_word, 'ultimatemember'); ?>" class="um-button" /></div> 
  28. <div class="um-right um-half"><a href="<?php echo $secondary_btn_url; ?>" class="um-button um-alt"><?php echo __( $secondary_btn_word, 'ultimatemember'); ?></a></div> 
  29.  
  30. <?php } else { ?> 
  31.  
  32. <div class="um-center"><input type="submit" value="<?php echo __( $args['primary_btn_word'], 'ultimatemember'); ?>" class="um-button" /></div> 
  33.  
  34. <?php } ?> 
  35.  
  36. <div class="um-clear"></div> 
  37.  
  38. </div> 
  39.  
  40. <?php