json-endpoints/class.wpcom-json-api-get-term-endpoint.php 1 location
|
@@ 22-25 (lines=4) @@
|
19 |
|
} |
20 |
|
|
21 |
|
$taxonomy_meta = get_taxonomy( $taxonomy ); |
22 |
|
if ( false === $taxonomy_meta || ( ! $taxonomy_meta->public && |
23 |
|
! current_user_can( $taxonomy_meta->cap->assign_terms ) ) ) { |
24 |
|
return new WP_Error( 'invalid_taxonomy', 'The taxonomy does not exist', 400 ); |
25 |
|
} |
26 |
|
|
27 |
|
$args = $this->query_args(); |
28 |
|
$term = $this->get_taxonomy( $slug, $taxonomy, $args['context'] ); |
json-endpoints/class.wpcom-json-api-list-terms-endpoint.php 1 location
|
@@ 22-25 (lines=4) @@
|
19 |
|
} |
20 |
|
|
21 |
|
$taxonomy_meta = get_taxonomy( $taxonomy ); |
22 |
|
if ( false === $taxonomy_meta || ( ! $taxonomy_meta->public && |
23 |
|
! current_user_can( $taxonomy_meta->cap->assign_terms ) ) ) { |
24 |
|
return new WP_Error( 'invalid_taxonomy', 'The taxonomy does not exist', 400 ); |
25 |
|
} |
26 |
|
|
27 |
|
$args = $this->query_args(); |
28 |
|
$args = $this->process_args( $args ); |