/ 设置 10 秒超时 // 每日统计清 0 runtime_set('todaycomments', 0); runtime_set('todayarticles', 0); runtime_set('todayusers', 0); if ($forumlist) { $fidarr = array(); foreach ($forumlist as $fid => $forum) { $fidarr[] = $forum['fid']; } forum_update($fidarr, array('todayposts' => 0, 'todaythreads' => 0)); } // 清理临时附件 attach_gc(); // 当天24点 $today = strtotime(date('Ymd')) + 86400; runtime_set('cron_2_last_date', $today, TRUE); // 往前推8个小时,尽量保证在前一天 升级过来和采集的数据会很卡 // table_day_cron($time - 8 * 3600); cache_delete('cron_lock_2'); } } } ?>hooks - Change Password Confirmed Email Text|Concepts Of Algorithm

hooks - Change Password Confirmed Email Text

admin2025-01-08  7

I've been struggling to find a hook I can use to edit the text in the password confirmed email that gets sent out when you've changed your password in WordPress.

Is there anyway to do this with a simple hook that I can add to the child themes functions?

Any help would be appreciated.

I've been struggling to find a hook I can use to edit the text in the password confirmed email that gets sent out when you've changed your password in WordPress.

Is there anyway to do this with a simple hook that I can add to the child themes functions?

Any help would be appreciated.

Share Improve this question edited Sep 25, 2019 at 12:42 butlerblog 5,0713 gold badges26 silver badges42 bronze badges asked Sep 12, 2019 at 8:08 DemonixDemonix 613 silver badges12 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

Use like this.

add_filter( 'password_change_email', 'wpse207879_change_password_mail_message', 10, 3 );
function wpse207879_change_password_mail_message( $pass_change_mail, $user, $userdata ) {
  $new_message_txt = __( 'Some text ###USERNAME### more text
      even more text ###EMAIL### more text after more text
      last bit of text ###SITENAME###' );
  $pass_change_mail[ 'message' ] = $new_message_txt;
  return $pass_change_mail;
}

Reference of the above code is: Change Password notification text on mail

This filter is in the wp_update_user() function and is documented here.

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1736269825a1381.html

最新回复(0)