Title: REST API Meta Support
Author: Pericor
Published: <strong>2020 年 5 月 26 日</strong>
Last modified: 2020 年 5 月 29 日

---

搜索插件

![](https://ps.w.org/rest-api-meta-support/assets/banner-772x250.png?rev=2312004)

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://ps.w.org/rest-api-meta-support/assets/icon-256x256.png?rev=2312004)

# REST API Meta Support

 作者：[Pericor](https://profiles.wordpress.org/pericror/)

[下载](https://downloads.wordpress.org/plugin/rest-api-meta-support.zip)

 * [详情](https://cn.wordpress.org/plugins/rest-api-meta-support/#description)
 * [评价](https://cn.wordpress.org/plugins/rest-api-meta-support/#reviews)
 * [开发进展](https://cn.wordpress.org/plugins/rest-api-meta-support/#developers)

 [支持](https://wordpress.org/support/plugin/rest-api-meta-support/)

## 描述

Automatically stores the meta data from the `meta` field of a wordpress REST API
posts ([/wp-json/wp/v2/posts](https://developer.wordpress.org/rest-api/reference/posts/#create-a-post))
or pages ([/wp-json/wp/v2/pages](https://developer.wordpress.org/rest-api/reference/pages/#create-a-page))
POST in the meta data associated with the created page or post using [update_post_meta](https://developer.wordpress.org/reference/functions/update_post_meta/).
The key / value information sent in the REST POST ‘meta’ object field is stored 
as both ‘key’ and ‘_key’ to support different plugin formats.
 For example, if trying
to set the YOAST SEO Plugin values dynamically when creating a page from the REST
API, you would simply add the fields to the meta field of the REST POST data when
you POST the endpoint, and the plugin values will be added to the page:

    ```
    {
    ...
      'meta': {
        'yoast_wpseo_title': "Title set from REST call"
        'yoast_wpseo_metadesc': "Meta description set from REST call"
      }
    ...
    }
    ```

Use this plugin when dynamically creating pages with the WordPress REST API to support
modifying plugin settings for pages/posts created using the REST API!

A guide on how to use this plugin to generate a page/post with plugins configured
from the REST API is [available at Pericror.](https://www.pericror.com/software/generating-pages-posts-plugins-using-wordpress-rest-api/)

Inspired as a broader alternative to [wp-api-yoast-meta.](https://github.com/ChazUK/wp-api-yoast-meta)

Compatible with the [wordpress rest api version 2.](http://v2.wp-api.org/)

## 评价

![](https://secure.gravatar.com/avatar/6dd2a2c436061fc79f1a208dffdbf332e809c8e12513577a2dfc14b186750254?
s=60&d=retro&r=g)

### 󠀁[Excellent plugin](https://wordpress.org/support/topic/excellent-plugin-6522/)󠁿

 [mortgageyields](https://profiles.wordpress.org/mortgageyields/) 2020 年 11 月 
30 日

Worked immediately upon activation.

![](https://secure.gravatar.com/avatar/c8537f9af755aca2782390991805328488b5df55664920a9bb75da1feef92c1c?
s=60&d=retro&r=g)

### 󠀁[Works as Described](https://wordpress.org/support/topic/works-as-described-262/)󠁿

 [Pericor](https://profiles.wordpress.org/pericror/) 2020 年 6 月 13 日

This plugin was developed and used to generate pages with a review plugin configured
programatically using the rest API per page and works as described.

 [ 阅读所有2条评价 ](https://wordpress.org/support/plugin/rest-api-meta-support/reviews/)

## 贡献者及开发者

「REST API Meta Support」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ Pericor ](https://profiles.wordpress.org/pericror/)

[帮助将「REST API Meta Support」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/rest-api-meta-support)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/rest-api-meta-support/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/rest-api-meta-support/)，或通过[RSS](https://plugins.trac.wordpress.org/log/rest-api-meta-support/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/rest-api-meta-support/)。

## 更新日志

#### 1.0

 * Initial Release

## 额外信息

 *  版本 **1.0.0**
 *  最后更新：**6 年前**
 *  活跃安装数量 **7,000+**
 *  WordPress 版本 ** 1.0 或更高版本 **
 *  已测试的最高版本为 **5.4.19**
 *  PHP 版本 ** 7.0 或更高版本 **
 *  语言
 * [English (US)](https://wordpress.org/plugins/rest-api-meta-support/)
 * 标签
 * [meta](https://cn.wordpress.org/plugins/tags/meta/)[rest](https://cn.wordpress.org/plugins/tags/rest/)
   [wp-api](https://cn.wordpress.org/plugins/tags/wp-api/)
 *  [高级视图](https://cn.wordpress.org/plugins/rest-api-meta-support/advanced/)

## 评级

 5 星（最高 5 星）。

 *  [  2 条 5 星评价     ](https://wordpress.org/support/plugin/rest-api-meta-support/reviews/?filter=5)
 *  [  0 条 4 星评价     ](https://wordpress.org/support/plugin/rest-api-meta-support/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/rest-api-meta-support/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/rest-api-meta-support/reviews/?filter=2)
 *  [  0 条 1 星评价     ](https://wordpress.org/support/plugin/rest-api-meta-support/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/rest-api-meta-support/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/rest-api-meta-support/reviews/)

## 贡献者

 *   [ Pericor ](https://profiles.wordpress.org/pericror/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/rest-api-meta-support/)

## 捐助

您愿意支持这个插件的发展吗?

 [ 捐助此插件 ](https://www.pericror.com/payment/)