Changeset 49403 for branches/4.3/src/wp-includes/class-wp-xmlrpc-server.php
- Timestamp:
- 10/29/2020 07:05:53 PM (6 years ago)
- Location:
- branches/4.3
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/wp-includes/class-wp-xmlrpc-server.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/4.3
- Property svn:mergeinfo changed
/branches/5.5 (added) merged: 49373-49379,49381 /trunk merged: 49380,49382-49388
- Property svn:mergeinfo changed
-
branches/4.3/src/wp-includes/class-wp-xmlrpc-server.php
r40697 r49403 3484 3484 return new IXR_Error( 404, __( 'Invalid post ID.' ) ); 3485 3485 3486 if ( 3487 'publish' === get_post_status( $post_id ) && 3488 ! current_user_can( 'edit_post', $post_id ) && 3489 post_password_required( $post_id ) 3490 ) { 3491 return new IXR_Error( 403, __( 'Sorry, you are not allowed to comment on this post.' ) ); 3492 } 3493 3494 if ( 3495 'private' === get_post_status( $post_id ) && 3496 ! current_user_can( 'read_post', $post_id ) 3497 ) { 3498 return new IXR_Error( 403, __( 'Sorry, you are not allowed to comment on this post.' ) ); 3499 } 3500 3486 3501 $comment = array(); 3487 3502 $comment['comment_post_ID'] = $post_id; … … 3848 3863 do_action( 'xmlrpc_call', 'wp.getMediaItem' ); 3849 3864 3850 if ( ! $attachment = get_post($attachment_id) ) 3865 $attachment = get_post( $attachment_id ); 3866 if ( ! $attachment || 'attachment' !== $attachment->post_type ) { 3851 3867 return new IXR_Error( 404, __( 'Invalid attachment ID.' ) ); 3868 } 3852 3869 3853 3870 return $this->_prepare_media_item( $attachment );
Note:
See TracChangeset
for help on using the changeset viewer.