WP REST API – User Meta

This plugin include author meta (name, display_name, first_name, last_name, user_email) into the WordPress REST API (v2) without additional API reques …

Author:Ruhul Amin (profile at wordpress.org)
WordPress version required:4.4
WordPress version tested:5.4.15
Plugin version:1.0.0
Added to WordPress repository:09-04-2017
Last updated:23-06-2020
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
Rating, %:80
Rated by:4
Plugin URI:http://www.wpbdcoders.me/
Total downloads:1 204
Active installs:20+
plugin download
Click to start download

Now you have no need to make additional requests to get author info (name, display_name, first_name, last_name, user_email, user_registered date) from their id that is available in the default json response.

Now all these author data is available in ‘author_meta’ field from your json response.

For example in ‘wp-json/wp/v2/posts’ you can find default fields ‘author’ that contains only its id. With this plugin you can also find new ‘author_meta’ field that include details about author.

Before:
{

author: 1

}

After:
{

author_meta: {
ID:”1″,
display_name:”admin”,
user_email:”demo@mail.com”,
user_nicename:”admin”,
user_registered:”2016-03-01 21:25:23″
}

}

Credits

This plugin is created by Ruhul Amin


ChangeLog