WordPress开发者和主题制作者的搜索引擎



signup_nonce_check ›

Since3.0.0
已弃用n/a
signup_nonce_check ( $result )
参数:
  • (array) $result
    Required: Yes
返回:
  • (array)
定义在:
文档:
Change Log:
  • MU

Process the signup nonce created in signup_nonce_fields().



源码

function signup_nonce_check( $result ) {
	if ( ! strpos( $_SERVER['PHP_SELF'], 'wp-signup.php' ) ) {
		return $result;
	}

	if ( ! wp_verify_nonce( $_POST['_signup_form'], 'signup_form_' . $_POST['signup_form_id'] ) ) {
		$result['errors']->add( 'invalid_nonce', __( 'Unable to submit this form, please try again.' ) );
	}

	return $result;
}