Changeset 49391 for branches/5.4/src/wp-includes/class-wp-xmlrpc-server.php
- Timestamp:
- 10/29/2020 06:39:14 PM (4 years ago)
- Location:
- branches/5.4
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.4
- Property svn:mergeinfo changed
/branches/5.5 (added) merged: 49373-49379,49381 /trunk merged: 49380,49382-49388
- Property svn:mergeinfo changed
-
branches/5.4/src/wp-includes/class-wp-xmlrpc-server.php
r47233 r49391 3880 3880 } 3881 3881 3882 if ( 3883 'publish' === get_post_status( $post_id ) && 3884 ! current_user_can( 'edit_post', $post_id ) && 3885 post_password_required( $post_id ) 3886 ) { 3887 return new IXR_Error( 403, __( 'Sorry, you are not allowed to comment on this post.' ) ); 3888 } 3889 3890 if ( 3891 'private' === get_post_status( $post_id ) && 3892 ! current_user_can( 'read_post', $post_id ) 3893 ) { 3894 return new IXR_Error( 403, __( 'Sorry, you are not allowed to comment on this post.' ) ); 3895 } 3896 3882 3897 $comment = array( 3883 3898 'comment_post_ID' => $post_id, … … 4293 4308 4294 4309 $attachment = get_post( $attachment_id ); 4295 if ( ! $attachment ) {4310 if ( ! $attachment || 'attachment' !== $attachment->post_type ) { 4296 4311 return new IXR_Error( 404, __( 'Invalid attachment ID.' ) ); 4297 4312 }
Note: See TracChangeset
for help on using the changeset viewer.