wp_get_user_request( int $request_id ): WP_User_Request|false

Returns the user request object for the specified request ID.


Parameters

$request_id int Required
The ID of the user request.

Top ↑

Return

WP_User_Request|false


Top ↑

Source

File: wp-includes/user.php. View all references

function wp_get_user_request( $request_id ) {
	$request_id = absint( $request_id );
	$post       = get_post( $request_id );

	if ( ! $post || 'user_request' !== $post->post_type ) {
		return false;
	}

	return new WP_User_Request( $post );
}


Top ↑

Changelog

Changelog
Version Description
4.9.6 Introduced.

Top ↑

User Contributed Notes

You must log in before being able to contribute a note or feedback.