WP REST API – User Meta

설명

Now you have no need to make additional requests to get author info from their id that is available in the default json response.
This plugin allows you to configure which user meta fields should be included in the REST API response through an easy-to-use admin interface.

Features

  • Configurable user meta fields
  • Includes avatar URL option
  • Shows user role information
  • No additional API requests needed
  • Clean implementation

Available Fields

  • Nickname
  • Description
  • User URL
  • First Name
  • Last Name
  • User Email
  • Role
  • Avatar

Example Response:
{
“id”: 1,
“title”: “Sample Post”,
“author”: 1,
“author_meta”: {
“first_name”: “John”,
“last_name”: “Doe”,
“role”: “administrator”,
“avatar”: “https://secure.gravatar.com/…”
}
}

Credits

This plugin is created by Ruhul Amin

Support

For support, please visit http://www.ruhulamin.me/

스크린샷

  • Settings page under Settings -> REST User Meta
  • Example of REST API response with user meta data

설치

  1. Upload the plugin folder to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ screen in WordPress
  3. Go to Settings -> REST User Meta to configure which fields to include

FAQ

Where can I find the settings page?

The settings page is located under Settings -> REST User Meta in your WordPress admin panel.

How do I access the user meta in the API response?

The user meta data is included in the author_meta object of each post in the REST API response.

Can I add custom meta fields?

Currently, the plugin supports a predefined set of common user meta fields. Custom fields support may be added in future versions.

후기

2020년 6월 29일
I used it for on of my projects and happy with it. Helped me what I needed.
2018년 3월 23일
Hey, When I try to activate the plugin I got this error “Parse error: syntax error, unexpected ‘[‘ in D:\hshome\rayanabd\api.crazywebtag.com\wp\wp-content\plugins\wp-rest-api-user-meta\wp_rest_api_usermeta.php on line 37” WP Version 4.9.4
2017년 12월 18일
I just installed the plugin, but it always return a null value even if there is an author.
2017년 4월 14일
Just installed, activated this plugin and use it without any other configuration
모든 4 평가 읽기

기여자 & 개발자

“WP REST API – User Meta”(은)는 오픈 소스 소프트웨어입니다. 다음의 사람들이 이 플러그인에 기여하였습니다.

기여자

자국어로 “WP REST API – User Meta”(을)를 번역하세요.

개발에 관심이 있으십니까?

코드 탐색하기는, SVN 저장소를 확인하시거나, 개발 기록RSS로 구독하세요.

변경이력

1.1.0

  • Added settings page under Settings menu
  • Added configurable user meta fields
  • Added avatar URL option
  • Added user role support
  • Improved code organization
  • Removed unnecessary debug information

1.0.0

  • Initial release