- Timestamp:
- 09/24/2026 05:30:50 AM (4 days ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php
r63790 r63912 569 569 } 570 570 571 if ( empty( $request['post'] ) ) { 572 return new WP_Error( 573 'rest_comment_invalid_post_id', 574 __( 'Sorry, you are not allowed to create this comment without a post.' ), 575 array( 'status' => 403 ) 576 ); 577 } 578 571 579 $edit_cap = $is_note ? array( 'edit_post', (int) $request['post'] ) : array( 'moderate_comments' ); 572 580 if ( isset( $request['status'] ) && ! current_user_can( ...$edit_cap ) ) { … … 576 584 sprintf( __( "Sorry, you are not allowed to edit '%s' for comments." ), 'status' ), 577 585 array( 'status' => rest_authorization_required_code() ) 578 );579 }580 581 if ( empty( $request['post'] ) ) {582 return new WP_Error(583 'rest_comment_invalid_post_id',584 __( 'Sorry, you are not allowed to create this comment without a post.' ),585 array( 'status' => 403 )586 586 ); 587 587 }
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)