最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

plugin development - `registration_errors` filter doesn't seem to be called

programmeradmin1浏览0评论

I'm working on a plugin for a customer with an existing WP site. I added some registration login with add_filter('registration_errors'...) but the code does not seem to be called. All my other hooks are working fine.

    add_filter( 'registration_errors', function($errors, $sanitized_user_login, $user_email) use ($rwlh_config) {
        RwlhLogger::Log("\n\nBegin rwlh reg error filter", 'debug');
        
        if(!$errors->get_error_code()) {
            $password = $_POST[$rwlh_config['regPasswordField']];
            $artistName = $_POST[$rwlh_config['regArtistNameField']];
    
            $errors = rwlh_register( $artistName, $user_email, $password, $errors );            
        }

        return $errors;
    }, 10, 3);

Note: Active plugins (see edit history).

发布评论

评论列表(0)

  1. 暂无评论