Wordpress:如何通过 REST API 使用 Wordpress post 格式

Wordpress: how to use Wordpress post format with REST API

我正在为移动应用程序构建一个博客,使用 WordPress 有 2 种 post 格式 标准 视频 功能:

add_theme_support(
    'post-formats',
    array(
        // 'aside',
        // 'image',
        'video',
        // 'quote',
        // 'link',
        // 'gallery',
        // 'audio',
    )
);

此函数在 post 上投放 formats 小部件,并在 REST API 上显示 format 字段] 在 /wp-json/wp/v2/posts.

问题是我无法按格式过滤 posts,我无法执行以下操作,例如 /wp-json/wp/v2/posts?format=video

我去用这个插件here剩下的API点变成:

/wp-json/wp/v2/posts?filter[post_format]=post-format-xxx