WordPress 如何禁用找回密码功能

在WordPress的一些开发场景中,不需要用户使用通过邮件重设密码,下面我们给出如何禁用找回密码功能。

WordPress中如何去除找回密码功能?

在主题的functions.php中(如何方便的在更新主题时保留 functions.php 里的自定义)添加如下代码

function disable_password_reset() {      return false; } add_filter ( 'allow_password_reset', 'disable_password_reset' );

WordPress如何在登陆页面中去除“忘记密码?”字样?

同样需要在functions.php中添加如下代码

function remove_lostpassword_text ( $text ) {      if ($text == '忘记密码?'){$text = '';}          return $text;       } add_filter( 'gettext', 'remove_lostpassword_text' ); 

腾讯云限时秒杀【点击购买】

搬瓦工,CN2高速线路,1GB带宽,电信联通优化KVM,延迟低,速度快,建站稳定,搬瓦工BandwagonHost VPS优惠码BWH26FXH3HIQ,支持<支付宝> 【点击购买】!

Vultr$3.5日本节点,512M内存/500G流量/1G带宽,电信联通优化,延迟低,速度快【点击购买】!

阿里云香港、新加坡VPS/1核/1G/25G SSD/1T流量/30M带宽/年付¥288【点击购买】

WordPress 如何禁用找回密码功能

`微信`扫码 加好友

链接到文章: https://gkxyz.com/wordpress-ruhejinyongzhaohuimimagongneng.html

推荐站点

评论已关闭