|
@@ 3395-3401 (lines=7) @@
|
| 3392 |
|
} |
| 3393 |
|
|
| 3394 |
|
$post_type = ''; |
| 3395 |
|
if ( isset( $struct['post_type'] ) ) { |
| 3396 |
|
$post_type_object = get_post_type_object( $struct['post_type'] ); |
| 3397 |
|
if ( ! $post_type_object || ! post_type_supports( $post_type_object->name, 'comments' ) ) { |
| 3398 |
|
return new IXR_Error( 404, __( 'Invalid post type.' ) ); |
| 3399 |
|
} |
| 3400 |
|
$post_type = $struct['post_type']; |
| 3401 |
|
} |
| 3402 |
|
|
| 3403 |
|
$offset = 0; |
| 3404 |
|
if ( isset( $struct['offset'] ) ) { |
|
@@ 3538-3545 (lines=8) @@
|
| 3535 |
|
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ |
| 3536 |
|
do_action( 'xmlrpc_call', 'wp.editComment' ); |
| 3537 |
|
|
| 3538 |
|
if ( isset($content_struct['status']) ) { |
| 3539 |
|
$statuses = get_comment_statuses(); |
| 3540 |
|
$statuses = array_keys($statuses); |
| 3541 |
|
|
| 3542 |
|
if ( ! in_array($content_struct['status'], $statuses) ) |
| 3543 |
|
return new IXR_Error( 401, __( 'Invalid comment status.' ) ); |
| 3544 |
|
$comment_approved = $content_struct['status']; |
| 3545 |
|
} |
| 3546 |
|
|
| 3547 |
|
// Do some timestamp voodoo |
| 3548 |
|
if ( !empty( $content_struct['date_created_gmt'] ) ) { |