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