Aurangajeb

Add Password Reset Tab to the WPUF My Account Page

Jul 15th, 2020
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.69 KB | None | 0 0
  1. /* --------------------------------------------------------------------------
  2. Add Password Reset Tab to Account
  3. -------------------------------------------------------------------------- */
  4.  
  5. add_filter( 'wpuf_account_sections', 'wpuf_my_page' );
  6. function wpuf_my_page( $sections ) {
  7. $sections = array_merge( $sections, array( array( 'slug' => 'update-password', 'label' => 'Reset Password' ) ) );
  8. return $sections;
  9. }
  10.  
  11. add_action( 'wpuf_account_content_update-password', 'wpuf_my_page_section', 10, 2 );
  12.  
  13. function wpuf_my_page_section( $sections, $current_section ) {
  14. wpuf_load_template(
  15. 'reset-pass-form.php',
  16. array( 'sections' => $sections, 'current_section' => $current_section )
  17. );
  18. }
Add Comment
Please, Sign In to add comment