Search
 
SCRIPT & CODE EXAMPLE
 

PHP

wordpress send reset password link inside wp_new_user_notification_email

// CHANGE DEFAULT MAIL FOR NEW USER REGISTRATION / RESET PASSWORD 
add_filter('wp_new_user_notification_email', 'change_notification_message', 10, 3);
    function change_notification_message( $wp_new_user_notification_email, $user, $blogname ) {
        // Generate a new key
        $key = get_password_reset_key( $user );
        // Set the subject
        $wp_new_user_notification_email['subject'] = __('Your email subject');
        // Put the username in the message
        $message = sprintf(__('Username: %s'), $user->user_login) . "

";
        // Give your user the link to reset her password 
        $message .= __('To set your password, visit the following address:') . "

";
        $message .= '<' . network_site_url("wp-login.php?action=rp&key=$key&login=" . rawurlencode($user->user_login), 'login') . ">

";
        $message .= wp_login_url() . "
";

        // Set the email's message
        $wp_new_user_notification_email['message'] = $message;

        return $wp_new_user_notification_email;
    }
Comment

PREVIOUS NEXT
Code Example
Php :: cara membuat looping table dengan php 
Php :: apache using wrong php version 
Php :: convert multdimentional array in array in php 
Php :: symlink.php laravel 
Php :: all resource routes laravel 8 
Php :: php super global variables 
Php :: laravel trans with parameters 
Php :: php one hour in the future 
Php :: protected gaurded in laravel 
Php :: include blade file in laravel 
Php :: Add Text Before the Product Title 
Php :: how to make a json request in php 
Php :: php substr 
Php :: laravel auth 
Php :: validate columns laravel excel 
Php :: php get current page url 
Php :: php try json decode and check 
Php :: convert png image transparent into webp php 
Php :: wordpress create comment programmatically 
Php :: how to deploy laravel windows 
Php :: twig log variable 
Php :: laravel queue timeout 
Php :: drupal 9 custom blocks dependency injection 
Php :: ajax search request 
Php :: pdo error message 
Php :: woocommerce get shipping classes 
Php :: smarty switch case 
Php :: laravel get route path uri 
Php :: integer data type php 
Php :: Compiling multiple CSS into ONE CSS with Laravel MIX 
ADD CONTENT
Topic
Content
Source link
Name
5+7 =