plugin-icon

WP REST API – Pure Taxonomies

This plugin include all available taxonomy attributes into the WordPress REST API (v2) without additional API requests.
Puanlar
5
Son güncellenme
March 1, 2016
Sürüm
1.0
Aktif kurulumlar
700

Now you have no need to make additional requests to get taxonomy info (term_id, name, slug, term_group, term_taxonomy_id, taxonomy, description, parent, count, filter) from their id that is available in the default json response.

Now all available taxonomy data is available in ‘pure_taxonomies’ field from your json response. It works for all custom added taxonomies, and for custom post types.

For example in ‘wp-json/wp/v2/posts’ you can find default fields ‘categories’, ‘tags’ and name of custom added taxonomies that contain only its id. With this plugin you can also find new ‘pure_taxonomies’ field that include all available ‘categories’, ‘tags’ and custom taxonomies data.

Before: { … categories: [ 3 ], tags: [ 2 ], custom_taxonomy_name: [ 1 ] … }

After: { … pure_taxonomies: { categories: [ { term_id: 3, name: “First category”, slug: “first-category”, term_group: 0, term_taxonomy_id: 3, taxonomy: “category”, description: “”, parent: 0, count: 3, filter: “raw”, cat_ID: 3, category_count: 3, category_description: “”, cat_name: “First category”, category_nicename: “first-category”, category_parent: 0 } ], tags: [ { term_id: 2, name: “First tag”, slug: “first-tag”, term_group: 0, term_taxonomy_id: 2, taxonomy: “post_tag”, description: “”, parent: 0, count: 2, filter: “raw” } ], custom_taxonomy_name: [ { term_id: 1, name: “Custom Taxonomy Name”, slug: “custom-taxonomy-name”, term_group: 0, term_taxonomy_id: 1, taxonomy: “custom_taxonomy_name”, description: “”, parent: 0, count: 1, filter: “raw” } ] } … }

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

ÜcretsizCreator paketinde
Yükleme işlemini tamamlayarak, WordPress.com'un Hizmet Şartları ile Üçüncü Taraf Eklenti Şartlarını kabul etmiş olursunuz.
Aktif kurulumlar
700
Test edilen son sürüm
4.4.33
Bu eklenti, WordPress tarafından barındırılan kurulumunuzda kullanılmak üzere indirilebilir.