這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

WP REST API – All Terms

描述

This plugin will add separate WordPress REST API (v2) endpoint, with all available terms (all used categories, tags and custom taxonomies).
It is very useful when you need to create some filters into your app, with lists of all available terms.

For example what can you get, using wp-json/wp/v2/all-terms request (where categories and tags – standart taxonomies, and technologies – custom created taxonomy):

{
    categories: [
        {
            term_id: 9,
            name: "Downloads",
            slug: "downloads",
            term_group: 0,
            term_taxonomy_id: 9,
            taxonomy: "category",
            description: "",
            parent: 0,
            count: 1,
            filter: "raw"
        },
            term_id: 1,
            name: "Uncategorized",
            slug: "uncategorized",
            term_group: 0,
            term_taxonomy_id: 1,
            taxonomy: "category",
            description: "",
            parent: 0,
            count: 4,
            filter: "raw"
        },
        {
            term_id: 3,
            name: "Wordpress",
            slug: "wordpress",
            term_group: 0,
            term_taxonomy_id: 3,
            taxonomy: "category",
            description: "",
            parent: 0,
            count: 2,
            filter: "raw"
        }
    ],
    tags: [
        {
            term_id: 16,
            name: "First tag",
            slug: "first-tag",
            term_group: 0,
            term_taxonomy_id: 16,
            taxonomy: "post_tag",
            description: "",
            parent: 0,
            count: 1,
            filter: "raw"
        },
        {
            term_id: 17,
            name: "Second tag",
            slug: "second-tag",
            term_group: 0,
            term_taxonomy_id: 17,
            taxonomy: "post_tag",
            description: "",
            parent: 0,
            count: 1,
            filter: "raw"
        }
    ],
    technologies: [
        {
            term_id: 15,
            name: "jQuery",
            slug: "jquery",
            term_group: 0,
            term_taxonomy_id: 15,
            taxonomy: "technologies",
            description: "",
            parent: 0,
            count: 1,
            filter: "raw"
        },
        {
            term_id: 14,
            name: "Wordpress",
            slug: "wordpress",
            term_group: 0,
            term_taxonomy_id: 14,
            taxonomy: "technologies",
            description: "",
            parent: 0,
            count: 1,
            filter: "raw"
        }
    ]
}

Check my other useful rest-api plugins: https://wordpress.org/plugins/tags/andrew-magik-rest-api.

安裝

  1. Double check you have the WordPress REST (v2) API installed and active
  2. Upload the plugin folder to the /wp-content/plugins/ directory, or install the plugin through the WordPress plugins screen directly.
  3. Activate the plugin through the ‘Plugins’ screen in WordPress

常見問題

What is the URL of this new WordPress REST API (v2) endpoint?

You get get all available terms using GET request:
http://yoursite.name/wp-json/wp/v2/all-terms

When this plugin is useful?

This plugin is very useful when you want to create filters, or lists of all available categories/tags (for example tag cloud).

Do you have other useful REST-API plugins?

Yes, I have. You can check them by tag: https://wordpress.org/plugins/tags/andrew-magik-rest-api.

評價

2018年10月14日
This should be included in the default WP API!
閱讀全部3個評價

貢獻者及開發者

“WP REST API – All Terms” 是一個開源的軟體。以下的人對這個外掛作出了貢獻。

貢獻者

將 WP REST API – All Terms 外掛本地化為台灣繁體中文版。

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

修改日誌

1.0

  • Initial release!