| @@ -1,17 +1,49 @@ | ||
| 1 | -<?php do_action('uwp_template_before', 'register'); ?> | |
| 2 | -<div class="uwp-content-wrap"> | |
| 3 | - <div class="uwp-registration"> | |
| 4 | - <div class="uwp-rf-icon"><i class="fa fa-pencil fa-fw"></i></div> | |
| 5 | - <?php do_action('uwp_template_form_title_before', 'register'); ?> | |
| 6 | - <h2><?php echo apply_filters('uwp_template_form_title', get_the_title(), 'register'); ?></h2> | |
| 7 | - <?php do_action('uwp_template_display_notices', 'register'); ?> | |
| 8 | - <form class="uwp-registration-form uwp_form" method="post" enctype="multipart/form-data"> | |
| 9 | - <?php do_action('uwp_template_fields', 'register'); ?> | |
| 10 | - <input type="hidden" name="uwp_register_nonce" value="<?php echo wp_create_nonce( 'uwp-register-nonce' ); ?>" /> | |
| 11 | - <?php do_action('uwp_social_fields', 'register'); ?> | |
| 12 | - <input name="uwp_register_submit" value="<?php echo __( 'Create Account', 'userswp' ); ?>" type="submit"> | |
| 13 | - </form> | |
| 14 | - <div class="uwp-login-now"><?php echo __( 'Already a Member?', 'userswp' ); ?> <a rel="nofollow" href="<?php echo uwp_get_page_link('login'); ?>"><?php echo __( 'Login Here', 'userswp' ); ?></a></div> | |
| 1 | +<?php do_action( 'uwp_template_before', 'register' ); | |
| 2 | +$css_class = ! empty( $args['css_class'] ) ? esc_attr( $args['css_class'] ) : ''; | |
| 3 | +$form_title = ! empty( $args['form_title'] ) ? esc_attr__( $args['form_title'], 'userswp' ) : __( 'Register', 'userswp' ); | |
| 4 | +$form_title = apply_filters( 'uwp_template_form_button_title', $form_title, 'register' ); | |
| 5 | +$button_title = uwp_get_option( 'register_form_button_title' ); | |
| 6 | +if ( $button_title ) { | |
| 7 | + $button_title = __( wp_unslash( $button_title ), 'userswp' ); | |
| 8 | +} else { | |
| 9 | + $button_title = __( 'Create account', 'userswp' ); | |
| 10 | +} | |
| 11 | +$button_title = apply_filters( 'uwp_register_form_title', $button_title ); | |
| 12 | +?> | |
| 13 | + <div class="uwp-content-wrap <?php echo esc_attr( $css_class ); ?>"> | |
| 14 | + <div class="uwp-registration"> | |
| 15 | + <div class="uwp-rf-icon"><i class="fas fa-pencil-alt fa-fw"></i></div> | |
| 16 | + <?php do_action( 'uwp_template_form_title_before', 'register' ); ?> | |
| 17 | + <h2><?php | |
| 18 | + echo apply_filters( 'uwp_template_form_title', $form_title, 'register' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped | |
| 19 | + ?> | |
| 20 | + </h2> | |
| 21 | + <?php do_action( 'uwp_template_display_notices', 'register' ); ?> | |
| 22 | + <form class="uwp-registration-form uwp_form" method="post" enctype="multipart/form-data"> | |
| 23 | + <?php do_action( 'uwp_template_fields', 'register', $args ); ?> | |
| 24 | + | |
| 25 | + <?php | |
| 26 | + $button_args = apply_filters( 'uwp_register_button_args', array( | |
| 27 | + 'type' => 'submit', | |
| 28 | + 'class' => 'uwp_register_submit', | |
| 29 | + 'content' => esc_html( $button_title ), | |
| 30 | + 'name' => 'uwp_register_submit', | |
| 31 | + ), $args ); | |
| 32 | + | |
| 33 | + // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped | |
| 34 | + printf( '<input type="%s" class="%s" name="%s" value="%s">', | |
| 35 | + esc_attr( $button_args['type'] ), | |
| 36 | + esc_attr( $button_args['class'] ), | |
| 37 | + esc_attr( $button_args['name'] ), | |
| 38 | + esc_attr( $button_args['content'] ) | |
| 39 | + ); | |
| 40 | + ?> | |
| 41 | + </form> | |
| 42 | + <div class="uwp-footer-link uwp-login-now"><?php esc_html_e( 'Already a member?', 'userswp' ); ?> <a | |
| 43 | + rel="nofollow" | |
| 44 | + href="<?php echo esc_url( uwp_get_login_page_url() ); ?>"><?php echo uwp_get_option("login_link_title") ? esc_html( uwp_get_option("login_link_title") ) : esc_html__( 'Login here', 'userswp' ); ?></a> | |
| 45 | + </div> | |
| 46 | + <?php do_action( 'uwp_social_fields', 'register', $args ); ?> | |
| 47 | + </div> | |
| 15 | 48 | </div> |
| 16 | -</div> | |
| 17 | -<?php do_action('uwp_template_after', 'register'); ?> | |
| 49 | +<?php do_action( 'uwp_template_after', 'register' ); ?> | |