- Timestamp:
- 10/21/2016 06:27:18 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php
r38832 r38864 420 420 } 421 421 422 $prepared_comment['comment_agent'] = ''; 422 if ( ! isset( $prepared_comment['comment_agent'] ) ) { 423 $prepared_comment['comment_agent'] = ''; 424 } 425 423 426 $prepared_comment['comment_approved'] = wp_allow_comment( $prepared_comment, true ); 424 427 … … 889 892 } 890 893 894 if ( isset( $request['author_user_agent'] ) ) { 895 $prepared_comment['comment_agent'] = $request['author_user_agent']; 896 } 897 891 898 if ( isset( $request['type'] ) ) { 892 899 // Comment type "comment" needs to be created as an empty string. … … 976 983 'type' => 'string', 977 984 'context' => array( 'edit' ), 978 'readonly' => true, 985 'arg_options' => array( 986 'sanitize_callback' => 'sanitize_text_field', 987 ), 979 988 ), 980 989 'content' => array(
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)