Changeset 49394 for branches/5.2/src/wp-includes/class-wp-xmlrpc-server.php
- Timestamp:
- 10/29/2020 06:44:12 PM (4 years ago)
- Location:
- branches/5.2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.2
- Property svn:mergeinfo changed
/branches/5.5 (added) merged: 49373-49379,49381 /trunk merged: 49380,49382-49388
- Property svn:mergeinfo changed
-
branches/5.2/src/wp-includes/class-wp-xmlrpc-server.php
r45082 r49394 3830 3830 } 3831 3831 3832 if ( 3833 'publish' === get_post_status( $post_id ) && 3834 ! current_user_can( 'edit_post', $post_id ) && 3835 post_password_required( $post_id ) 3836 ) { 3837 return new IXR_Error( 403, __( 'Sorry, you are not allowed to comment on this post.' ) ); 3838 } 3839 3840 if ( 3841 'private' === get_post_status( $post_id ) && 3842 ! current_user_can( 'read_post', $post_id ) 3843 ) { 3844 return new IXR_Error( 403, __( 'Sorry, you are not allowed to comment on this post.' ) ); 3845 } 3846 3832 3847 $comment = array( 3833 3848 'comment_post_ID' => $post_id, … … 4234 4249 do_action( 'xmlrpc_call', 'wp.getMediaItem' ); 4235 4250 4236 if ( ! $attachment = get_post( $attachment_id ) ) { 4251 $attachment = get_post( $attachment_id ); 4252 if ( ! $attachment || 'attachment' !== $attachment->post_type ) { 4237 4253 return new IXR_Error( 404, __( 'Invalid attachment ID.' ) ); 4238 4254 }
Note: See TracChangeset
for help on using the changeset viewer.