Function: get_most_recent_post_of_user

get_most_recent_post_of_user( integer $user_id )

Get a user's most recent post.

Walks through each of a user's blogs to find the post with the most recent post_date_gmt.

Parameters

Name Type(s) Default Value Description
$user_id integer

Returns

array

Contains the blog_id, post_id, post_date_gmt, and post_gmt_ts

WordPress Developer Newsletter

Stay on top of the latest WordPress API changes, developer tool updates, security alerts and more.