json-endpoints/class.wpcom-json-api-get-term-endpoint.php 1 location
|
@@ 41-44 (lines=4) @@
|
| 38 |
|
} |
| 39 |
|
|
| 40 |
|
$taxonomy_meta = get_taxonomy( $taxonomy ); |
| 41 |
|
if ( false === $taxonomy_meta || ( ! $taxonomy_meta->public && |
| 42 |
|
! current_user_can( $taxonomy_meta->cap->assign_terms ) ) ) { |
| 43 |
|
return new WP_Error( 'invalid_taxonomy', 'The taxonomy does not exist', 400 ); |
| 44 |
|
} |
| 45 |
|
|
| 46 |
|
$args = $this->query_args(); |
| 47 |
|
$term = $this->get_taxonomy( $slug, $taxonomy, $args['context'] ); |
json-endpoints/class.wpcom-json-api-list-terms-endpoint.php 1 location
|
@@ 50-53 (lines=4) @@
|
| 47 |
|
} |
| 48 |
|
|
| 49 |
|
$taxonomy_meta = get_taxonomy( $taxonomy ); |
| 50 |
|
if ( false === $taxonomy_meta || ( ! $taxonomy_meta->public && |
| 51 |
|
! current_user_can( $taxonomy_meta->cap->assign_terms ) ) ) { |
| 52 |
|
return new WP_Error( 'invalid_taxonomy', 'The taxonomy does not exist', 400 ); |
| 53 |
|
} |
| 54 |
|
|
| 55 |
|
$args = $this->query_args(); |
| 56 |
|
$args = $this->process_args( $args ); |