Changeset 49402 for branches/4.4/src/wp-includes/class-wp-xmlrpc-server.php
- Timestamp:
- 10/29/2020 07:04:00 PM (5 years ago)
- Location:
- branches/4.4
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/wp-includes/class-wp-xmlrpc-server.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/4.4
- Property svn:mergeinfo changed
/branches/5.5 (added) merged: 49373-49379,49381 /trunk merged: 49380,49382-49388
- Property svn:mergeinfo changed
-
branches/4.4/src/wp-includes/class-wp-xmlrpc-server.php
r40696 r49402 3550 3550 } 3551 3551 3552 if ( 3553 'publish' === get_post_status( $post_id ) && 3554 ! current_user_can( 'edit_post', $post_id ) && 3555 post_password_required( $post_id ) 3556 ) { 3557 return new IXR_Error( 403, __( 'Sorry, you are not allowed to comment on this post.' ) ); 3558 } 3559 3560 if ( 3561 'private' === get_post_status( $post_id ) && 3562 ! current_user_can( 'read_post', $post_id ) 3563 ) { 3564 return new IXR_Error( 403, __( 'Sorry, you are not allowed to comment on this post.' ) ); 3565 } 3566 3552 3567 $comment = array(); 3553 3568 $comment['comment_post_ID'] = $post_id; … … 3928 3943 do_action( 'xmlrpc_call', 'wp.getMediaItem' ); 3929 3944 3930 if ( ! $attachment = get_post($attachment_id) ) 3945 $attachment = get_post( $attachment_id ); 3946 if ( ! $attachment || 'attachment' !== $attachment->post_type ) { 3931 3947 return new IXR_Error( 404, __( 'Invalid attachment ID.' ) ); 3948 } 3932 3949 3933 3950 return $this->_prepare_media_item( $attachment );
Note: See TracChangeset
for help on using the changeset viewer.