|
@@ 3299-3305 (lines=7) @@
|
| 3296 |
|
} |
| 3297 |
|
|
| 3298 |
|
$post_type = ''; |
| 3299 |
|
if ( isset( $struct['post_type'] ) ) { |
| 3300 |
|
$post_type_object = get_post_type_object( $struct['post_type'] ); |
| 3301 |
|
if ( ! $post_type_object || ! post_type_supports( $post_type_object->name, 'comments' ) ) { |
| 3302 |
|
return new IXR_Error( 404, __( 'Invalid post type.' ) ); |
| 3303 |
|
} |
| 3304 |
|
$post_type = $struct['post_type']; |
| 3305 |
|
} |
| 3306 |
|
|
| 3307 |
|
$offset = 0; |
| 3308 |
|
if ( isset( $struct['offset'] ) ) { |
|
@@ 3442-3449 (lines=8) @@
|
| 3439 |
|
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ |
| 3440 |
|
do_action( 'xmlrpc_call', 'wp.editComment' ); |
| 3441 |
|
|
| 3442 |
|
if ( isset($content_struct['status']) ) { |
| 3443 |
|
$statuses = get_comment_statuses(); |
| 3444 |
|
$statuses = array_keys($statuses); |
| 3445 |
|
|
| 3446 |
|
if ( ! in_array($content_struct['status'], $statuses) ) |
| 3447 |
|
return new IXR_Error( 401, __( 'Invalid comment status.' ) ); |
| 3448 |
|
$comment_approved = $content_struct['status']; |
| 3449 |
|
} |
| 3450 |
|
|
| 3451 |
|
// Do some timestamp voodoo |
| 3452 |
|
if ( !empty( $content_struct['date_created_gmt'] ) ) { |