首先
你的action
被称为rguroo_email_verification_form
, 因此,您应该在注册挂钩时使用它。但您可以使用此选项:
add_action( \'admin_post_nopriv_email_verification_form\', \'verify_and_sanitize_email_form\', $priority = 10, $accepted_args = 1 );
add_action( \'admin_post_email_verification_form\', \'verify_and_sanitize_email_form\', $priority = 10, $accepted_args = 1 );
它应该是:
add_action( \'admin_post_nopriv_rguroo_email_verification_form\', \'verify_and_sanitize_email_form\', $priority = 10, $accepted_args = 1 );
add_action( \'admin_post_rguroo_email_verification_form\', \'verify_and_sanitize_email_form\', $priority = 10, $accepted_args = 1 );
还有。。。这些操作不采用任何参数,但您声明它们应采用一个参数(但稍后,您的函数不采用任何…)