Changeset 34559 for trunk/src/wp-includes/class-wp-xmlrpc-server.php
- Timestamp:
- 09/25/2015 08:19:19 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-xmlrpc-server.php
r34257 r34559 3454 3454 $post_id = url_to_postid($post); 3455 3455 3456 if ( ! $post_id ) 3456 if ( ! $post_id ) { 3457 3457 return new IXR_Error( 404, __( 'Invalid post ID.' ) ); 3458 3459 if ( ! get_post($post_id) ) 3458 } 3459 3460 if ( ! get_post( $post_id ) ) { 3460 3461 return new IXR_Error( 404, __( 'Invalid post ID.' ) ); 3462 } 3463 3464 if ( ! comments_open( $post_id ) ) { 3465 return new IXR_Error( 403, __( 'Sorry, comments are closed for this item.' ) ); 3466 } 3461 3467 3462 3468 $comment = array(); … … 3464 3470 3465 3471 if ( $logged_in ) { 3466 $comment['comment_author'] = $this->escape( $user->display_name ); 3467 $comment['comment_author_email'] = $this->escape( $user->user_email ); 3468 $comment['comment_author_url'] = $this->escape( $user->user_url ); 3472 $display_name = $user->display_name; 3473 $user_email = $user->user_email; 3474 $user_url = $user->user_url; 3475 3476 $comment['comment_author'] = $this->escape( $display_name ); 3477 $comment['comment_author_email'] = $this->escape( $user_email ); 3478 $comment['comment_author_url'] = $this->escape( $user_url ); 3469 3479 $comment['user_ID'] = $user->ID; 3470 3480 } else {
Note: See TracChangeset
for help on using the changeset viewer.