wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



wp_get_user_request › WordPress Function

Od4.9.6
Przestarzałyn/a
wp_get_user_request ( $request_id )
Parametry:
  • (int) $request_id The ID of the user request.
    Wymagane: Tak
Powrót:
  • (WP_User_Request|false)
Zdefiniowane na:
Codex:

Returns the user request object for the specified request ID.



Źródło

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