Changeset 49400 for branches/4.6/src/wp-includes/class-wp-xmlrpc-server.php
- Timestamp:
- 10/29/2020 06:59:47 PM (6 years ago)
- Location:
- branches/4.6
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/wp-includes/class-wp-xmlrpc-server.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/4.6
- Property svn:mergeinfo changed
/branches/5.5 (added) merged: 49373-49379,49381 /trunk merged: 49380,49382-49388
- Property svn:mergeinfo changed
-
branches/4.6/src/wp-includes/class-wp-xmlrpc-server.php
r40694 r49400 3574 3574 } 3575 3575 3576 if ( 3577 'publish' === get_post_status( $post_id ) && 3578 ! current_user_can( 'edit_post', $post_id ) && 3579 post_password_required( $post_id ) 3580 ) { 3581 return new IXR_Error( 403, __( 'Sorry, you are not allowed to comment on this post.' ) ); 3582 } 3583 3584 if ( 3585 'private' === get_post_status( $post_id ) && 3586 ! current_user_can( 'read_post', $post_id ) 3587 ) { 3588 return new IXR_Error( 403, __( 'Sorry, you are not allowed to comment on this post.' ) ); 3589 } 3590 3576 3591 $comment = array(); 3577 3592 $comment['comment_post_ID'] = $post_id; … … 3952 3967 do_action( 'xmlrpc_call', 'wp.getMediaItem' ); 3953 3968 3954 if ( ! $attachment = get_post($attachment_id) ) 3969 $attachment = get_post( $attachment_id ); 3970 if ( ! $attachment || 'attachment' !== $attachment->post_type ) { 3955 3971 return new IXR_Error( 404, __( 'Invalid attachment ID.' ) ); 3972 } 3956 3973 3957 3974 return $this->_prepare_media_item( $attachment );
Note: See TracChangeset
for help on using the changeset viewer.