A WordPress-centric search engine for devs and theme authors



wp_get_user_request_data ›

Since4.9.6
Deprecatedn/a
wp_get_user_request_data ( $request_id )
Parameters:
  • (int) $request_id Request ID to get data about.
    Required: Yes
Returns:
  • (WP_User_Request|false)
Defined at:
Codex:

Return data about a user request.



Source

function wp_get_user_request_data( $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 );
}