如何自定义Wordpress登录错误信息?

时间:2016-03-10 08:37:56

标签: wordpress wordpress-plugin

我正在使用Google应用登录插件将Google用户登录到我的Wordpress网站。

当我尝试使用非注册用户登录时,我收到以下错误消息

User foo@bar.com not registered in Wordpress

我不确定这是否是一个插件查询,但我如何才能将此错误消息更改为

User foo@bar.com is not registered

1 个答案:

答案 0 :(得分:1)

 Hello sir , 

   you can do it by the edit of core file just go in your plugin folder-open google-app-login plugin >core folder->core_google_apps_login.php 
just open this file and and jump on line no 380 and edit the function 





protected function createUserOrError($userinfo, $options) {
        return( new WP_Error('ga_login_error', sprintf( __( 'User %s not registered in Wordpress' , 'google-apps-login'),
                                                 $userinfo->email) ) );
    }




 to :





protected function createUserOrError($userinfo, $options) {
        return( new WP_Error('ga_login_error', sprintf( __( 'User %s not registered' , 'google-apps-login'),
                                                 $userinfo->email) ) );
    }


Try