Changeset 49398 for branches/4.8/src/wp-includes/class-wp-xmlrpc-server.php
- Timestamp:
- 10/29/2020 06:54:29 PM (5 years ago)
- Location:
- branches/4.8
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/wp-includes/class-wp-xmlrpc-server.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/4.8
- Property svn:mergeinfo changed
/branches/5.5 (added) merged: 49373-49379,49381 /trunk merged: 49380,49382-49388
- Property svn:mergeinfo changed
-
branches/4.8/src/wp-includes/class-wp-xmlrpc-server.php
r40692 r49398 3581 3581 } 3582 3582 3583 if ( 3584 'publish' === get_post_status( $post_id ) && 3585 ! current_user_can( 'edit_post', $post_id ) && 3586 post_password_required( $post_id ) 3587 ) { 3588 return new IXR_Error( 403, __( 'Sorry, you are not allowed to comment on this post.' ) ); 3589 } 3590 3591 if ( 3592 'private' === get_post_status( $post_id ) && 3593 ! current_user_can( 'read_post', $post_id ) 3594 ) { 3595 return new IXR_Error( 403, __( 'Sorry, you are not allowed to comment on this post.' ) ); 3596 } 3597 3583 3598 $comment = array( 3584 3599 'comment_post_ID' => $post_id, … … 3966 3981 do_action( 'xmlrpc_call', 'wp.getMediaItem' ); 3967 3982 3968 if ( ! $attachment = get_post($attachment_id) ) 3983 $attachment = get_post( $attachment_id ); 3984 if ( ! $attachment || 'attachment' !== $attachment->post_type ) { 3969 3985 return new IXR_Error( 404, __( 'Invalid attachment ID.' ) ); 3986 } 3970 3987 3971 3988 return $this->_prepare_media_item( $attachment );
Note: See TracChangeset
for help on using the changeset viewer.