Changeset 49409 for branches/3.7/src/wp-includes/class-wp-xmlrpc-server.php
- Timestamp:
- 10/29/2020 07:17:08 PM (6 years ago)
- Location:
- branches/3.7
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.7
- Property svn:mergeinfo changed
/branches/5.5 (added) merged: 49373-49379,49381 /trunk merged: 49380,49382-49388
- Property svn:mergeinfo changed
-
branches/3.7/src
- Property svn:mergeinfo changed
/trunk/src merged: 49380,49382-49388
- Property svn:mergeinfo changed
-
branches/3.7/src/wp-includes/class-wp-xmlrpc-server.php
r40703 r49409 3042 3042 return new IXR_Error( 404, __( 'Invalid post ID.' ) ); 3043 3043 3044 if ( 3045 'publish' === get_post_status( $post_id ) && 3046 ! current_user_can( 'edit_post', $post_id ) && 3047 post_password_required( $post_id ) 3048 ) { 3049 return new IXR_Error( 403, __( 'Sorry, you are not allowed to comment on this post.' ) ); 3050 } 3051 3052 if ( 3053 'private' === get_post_status( $post_id ) && 3054 ! current_user_can( 'read_post', $post_id ) 3055 ) { 3056 return new IXR_Error( 403, __( 'Sorry, you are not allowed to comment on this post.' ) ); 3057 } 3058 3059 $comment = array(); 3044 3060 $comment['comment_post_ID'] = $post_id; 3045 3061 … … 3350 3366 do_action('xmlrpc_call', 'wp.getMediaItem'); 3351 3367 3352 if ( ! $attachment = get_post($attachment_id) ) 3368 $attachment = get_post( $attachment_id ); 3369 if ( ! $attachment || 'attachment' !== $attachment->post_type ) { 3353 3370 return new IXR_Error( 404, __( 'Invalid attachment ID.' ) ); 3371 } 3354 3372 3355 3373 return $this->_prepare_media_item( $attachment );
Note: See TracChangeset
for help on using the changeset viewer.