
內容簡介
由於安全和隱私問題,JSON REST API(WP API)僅允許驗證使用者存取文章的自訂欄位數據(post meta data)。
此外掛程式是一種簡單的方式,讓未經驗證的使用者也能存取文章的自訂欄位數據。
啟用外掛後,前往 WP API Customizer 選項頁面。
點擊加號圖示以添加列。
設置您想在未經驗證的使用者使用時在文章中使用的 JSON 屬性和自訂欄位名稱。
JSON REST API 將提供資料作為“post_meta”,如下所示:
"post_meta":{"your_attribute_a":"Custom Field A value","your_attribute_b":"Custom Field B value"}
外掛標籤
開發者團隊
原文外掛簡介
Due to security/privacy concerns, JSON REST API (WP API) only allows post meta data (custom field value) for authenticated users.
This plugin is an easy way to make post meta available when unauthenticated.
After activate the plugin, go to WP API Customizer option page.
Click the plus icon to add rows.
Set JSON attributes and custom field names in your posts that you want to use when unauthenticated.
The JSON REST API will provide the data as “post_meta” like the following:
"post_meta":{"your_attribute_a":"Custom Field A value","your_attribute_b":"Custom Field B value"}
