summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/jetpack/json-endpoints/class.wpcom-json-api-list-terms-endpoint.php')
-rw-r--r--plugins/jetpack/json-endpoints/class.wpcom-json-api-list-terms-endpoint.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/jetpack/json-endpoints/class.wpcom-json-api-list-terms-endpoint.php b/plugins/jetpack/json-endpoints/class.wpcom-json-api-list-terms-endpoint.php
index 83edcfc9..f05d852e 100644
--- a/plugins/jetpack/json-endpoints/class.wpcom-json-api-list-terms-endpoint.php
+++ b/plugins/jetpack/json-endpoints/class.wpcom-json-api-list-terms-endpoint.php
@@ -24,6 +24,9 @@ new WPCOM_JSON_API_List_Terms_Endpoint( array(
'count' => 'Order by the number of posts in each tag.',
),
),
+
+ 'allow_fallback_to_jetpack_blog_token' => true,
+
'response_format' => array(
'found' => '(int) The number of terms returned.',
'terms' => '(array) Array of tag objects.',
@@ -44,7 +47,7 @@ class WPCOM_JSON_API_List_Terms_Endpoint extends WPCOM_JSON_API_Endpoint {
}
$taxonomy_meta = get_taxonomy( $taxonomy );
- if ( false === $taxonomy_meta || ( ! $taxonomy_meta->public &&
+ if ( false === $taxonomy_meta || ( ! $taxonomy_meta->public &&
! current_user_can( $taxonomy_meta->cap->assign_terms ) ) ) {
return new WP_Error( 'invalid_taxonomy', 'The taxonomy does not exist', 400 );
}