signup_nonce_check()WP 3.0.0

Processes the signup nonce created in signup_nonce_fields().

Хуков нет.

Возвращает

Массив.

Использование

signup_nonce_check( $result );
$result(массив) (обязательный)
-

Список изменений

С версии 3.0.0 Введена.

Код signup_nonce_check() WP 6.5.2

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;
}