Changeset 49406 for branches/4.0/src/wp-includes/class-wp-xmlrpc-server.php
- Timestamp:
- 10/29/2020 07:12:16 PM (6 years ago)
- Location:
- branches/4.0
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/wp-includes/class-wp-xmlrpc-server.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/4.0
- Property svn:mergeinfo changed
/branches/5.5 (added) merged: 49373-49379,49381 /trunk merged: 49380,49382-49388
- Property svn:mergeinfo changed
-
branches/4.0/src/wp-includes/class-wp-xmlrpc-server.php
r40700 r49406 3312 3312 return new IXR_Error( 404, __( 'Invalid post ID.' ) ); 3313 3313 3314 if ( 3315 'publish' === get_post_status( $post_id ) && 3316 ! current_user_can( 'edit_post', $post_id ) && 3317 post_password_required( $post_id ) 3318 ) { 3319 return new IXR_Error( 403, __( 'Sorry, you are not allowed to comment on this post.' ) ); 3320 } 3321 3322 if ( 3323 'private' === get_post_status( $post_id ) && 3324 ! current_user_can( 'read_post', $post_id ) 3325 ) { 3326 return new IXR_Error( 403, __( 'Sorry, you are not allowed to comment on this post.' ) ); 3327 } 3328 3329 $comment = array(); 3314 3330 $comment['comment_post_ID'] = $post_id; 3315 3331 … … 3634 3650 do_action( 'xmlrpc_call', 'wp.getMediaItem' ); 3635 3651 3636 if ( ! $attachment = get_post($attachment_id) ) 3652 $attachment = get_post( $attachment_id ); 3653 if ( ! $attachment || 'attachment' !== $attachment->post_type ) { 3637 3654 return new IXR_Error( 404, __( 'Invalid attachment ID.' ) ); 3655 } 3638 3656 3639 3657 return $this->_prepare_media_item( $attachment );
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)