json-endpoints/class.wpcom-json-api-update-comment-endpoint.php 1 location
|
@@ 86-88 (lines=3) @@
|
83 |
|
|
84 |
|
$args = $this->query_args(); |
85 |
|
$input = $this->input(); |
86 |
|
if ( !is_array( $input ) || !$input || !strlen( $input['content'] ) ) { |
87 |
|
return new WP_Error( 'invalid_input', 'Invalid request input', 400 ); |
88 |
|
} |
89 |
|
|
90 |
|
$user = wp_get_current_user(); |
91 |
|
if ( !$user || is_wp_error( $user ) || !$user->ID ) { |
json-endpoints/class.wpcom-json-api-update-taxonomy-endpoint.php 1 location
|
@@ 32-34 (lines=3) @@
|
29 |
|
function new_taxonomy( $path, $blog_id, $taxonomy_type ) { |
30 |
|
$args = $this->query_args(); |
31 |
|
$input = $this->input(); |
32 |
|
if ( !is_array( $input ) || !$input || !strlen( $input['name'] ) ) { |
33 |
|
return new WP_Error( 'invalid_input', 'Unknown data passed', 400 ); |
34 |
|
} |
35 |
|
|
36 |
|
$user = wp_get_current_user(); |
37 |
|
if ( !$user || is_wp_error( $user ) || !$user->ID ) { |
json-endpoints/class.wpcom-json-api-update-term-endpoint.php 1 location
|
@@ 50-52 (lines=3) @@
|
47 |
|
function new_term( $path, $blog_id, $taxonomy ) { |
48 |
|
$args = $this->query_args(); |
49 |
|
$input = $this->input(); |
50 |
|
if ( ! is_array( $input ) || ! $input || ! strlen( $input['name'] ) ) { |
51 |
|
return new WP_Error( 'invalid_input', 'Unknown data passed', 400 ); |
52 |
|
} |
53 |
|
|
54 |
|
$tax = get_taxonomy( $taxonomy ); |
55 |
|
if ( ! current_user_can( $tax->cap->manage_terms ) ) { |