Advertisement
Guest User

Untitled

a guest
Apr 14th, 2016
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.04 KB | None | 0 0
  1. <?php
  2.  
  3. check_page_security();
  4.  
  5. require_once('includes/update-profile.php');
  6. ?>
  7.  
  8. <?php get_header(); ?>
  9.  
  10. <?php get_template_part('parts/dashboard/user'); ?>
  11.  
  12. <?php if ( !have_posts() ) get_template_part( 'parts/notice/no-posts' ); ?>
  13.  
  14. <?php while (have_posts()) : the_post(); ?>
  15.  
  16. <section id="dashboard-content">
  17.  
  18. <div class="wrap">
  19.  
  20. <?php get_template_part( 'parts/dashboard/edit-profile/intro' ); ?>
  21.  
  22. <?php if( !empty( $_GET['updated'] ) ): ?>
  23. <div class="success"><?php _e('Profile successfully updated', 'textdomain'); ?></div>
  24. <?php endif; ?>
  25.  
  26. <?php if( !empty( $_GET['validation'] ) ): ?>
  27.  
  28. <?php if( $_GET['validation'] == 'emailnotvalid' ): ?>
  29. <div class="error"><?php _e('The given email address is not valid', 'textdomain'); ?></div>
  30. <?php elseif( $_GET['validation'] == 'emailexists' ): ?>
  31. <div class="error"><?php _e('The given email address already exists', 'textdomain'); ?></div>
  32. <?php elseif( $_GET['validation'] == 'passwordmismatch' ): ?>
  33. <div class="error"><?php _e('The given passwords did not match', 'textdomain'); ?></div>
  34. <?php elseif( $_GET['validation'] == 'unknown' ): ?>
  35. <div class="error"><?php _e('An unknown error accurd, please try again or contant the website administrator', 'textdomain'); ?></div>
  36. <?php endif; ?>
  37.  
  38. <?php endif; ?>
  39.  
  40. <?php $current_user = wp_get_current_user(); ?>
  41.  
  42. <form method="post" id="adduser" action="<?php the_permalink(); ?>">
  43.  
  44. <h3><?php _e('Personal info', 'textdomain'); ?></h3>
  45.  
  46. <p>
  47. <label for="first-name"><?php _e('Username', 'textdomain'); ?></label>
  48. <input class="text-input" name="user_login" type="text" id="user_login" value="<?php the_author_meta( 'user_login', $current_user->ID ); ?>" disabled/>
  49. <?php _e('It is not possible to change your username.', 'textdomain'); ?>
  50. </p>
  51.  
  52. <p><?php _e('Please note, all information below is also shown on the website.', 'textdomain'); ?></p>
  53.  
  54. <p>
  55. <label for="first-name"><?php _e('First name', 'textdomain'); ?></label>
  56. <input class="text-input" name="first-name" type="text" id="first-name" value="<?php the_author_meta( 'first_name', $current_user->ID ); ?>" />
  57. </p>
  58.  
  59. <p>
  60. <label for="last-name"><?php _e('Last name', 'textdomain'); ?></label>
  61. <input class="text-input" name="last-name" type="text" id="last-name" value="<?php the_author_meta( 'last_name', $current_user->ID ); ?>" />
  62. </p>
  63.  
  64. <p>
  65. <?php _e('Public name:', 'textdomain'); ?> <?php echo $current_user->display_name; ?>
  66. </p>
  67.  
  68. <p>
  69. <label for="email"><?php _e('E-mail *', 'textdomain'); ?></label>
  70. <input class="text-input" name="email" type="text" id="email" value="<?php the_author_meta( 'user_email', $current_user->ID ); ?>" />
  71. </p>
  72.  
  73. <p>
  74. <label for="phone_number"><?php _e('Phone', 'textdomain'); ?></label>
  75. <input class="text-input" name="phone_number" type="text" id="phone_number" value="<?php the_author_meta( 'phone_number', $current_user->ID ); ?>" />
  76. </p>
  77.  
  78. <p>
  79. <label for="user_specialisation"><?php _e('Specialisation', 'textdomain'); ?></label>
  80. <input class="text-input" name="user_specialisation" type="text" id="user_specialisation" value="<?php the_author_meta( 'specialisation', $current_user->ID ); ?>" />
  81. </p>
  82.  
  83. <p>
  84. <label for="location"><?php _e('Location', 'textdomain'); ?></label>
  85. <input class="text-input" name="location" type="text" id="location" value="<?php the_author_meta( 'location', $current_user->ID ); ?>" />
  86. </p>
  87.  
  88. <?php
  89. // action hook for plugin and extra fields
  90. do_action('edit_user_profile', $current_user);
  91. ?>
  92.  
  93. <p><?php _e('Upload an image of 150x150', 'textdomain'); ?></p>
  94.  
  95. <h3><?php _e('Change password', 'textdomain'); ?></h3>
  96.  
  97. <p><?php _e('When both password fields are left empty, your password will not change', 'textdomain'); ?></p>
  98.  
  99. <p class="form-password">
  100. <label for="pass1"><?php _e('Password *', 'profile'); ?> </label>
  101. <input class="text-input" name="pass1" type="password" id="pass1" />
  102. </p><!-- .form-password -->
  103. <p class="form-password">
  104. <label for="pass2"><?php _e('Repeat password *', 'profile'); ?></label>
  105. <input class="text-input" name="pass2" type="password" id="pass2" />
  106. </p><!-- .form-password -->
  107.  
  108. <p class="form-submit">
  109. <input name="updateuser" type="submit" id="updateuser" class="submit button" value="<?php _e('Update profile', 'textdomain'); ?>" />
  110. <?php wp_nonce_field( 'update-user' ) ?>
  111. <input name="honey-name" value="" type="text" style="display:none;"></input>
  112. <input name="action" type="hidden" id="action" value="update-user" />
  113. </p><!-- .form-submit -->
  114.  
  115. </form><!-- #adduser -->
  116.  
  117. </div>
  118.  
  119. <?php endwhile; ?>
  120.  
  121. <?php wp_reset_postdata(); ?>
  122.  
  123. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement