Changeset 2471376
- Timestamp:
- 02/09/2021 07:46:52 AM (5 years ago)
- Location:
- wp-mini-program
- Files:
-
- 2 edited
-
tags/1.3.7/router/comments.php (modified) (1 diff)
-
trunk/router/comments.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
wp-mini-program/tags/1.3.7/router/comments.php
r2471362 r2471376 214 214 if($type == 'comment') { 215 215 $commentarr = array( 216 'comment_post_ID' => $post_id, // to which post the comment will show up217 'comment_author' => ucfirst($user_name), //fixed value - can be dynamic218 'comment_author_email' => $user_email, //fixed value - can be dynamic219 'comment_author_url' => $user_url, //fixed value - can be dynamic220 'comment_content' => $content, //fixed value - can be dynamic216 'comment_post_ID' => $post_id, 217 'comment_author' => ucfirst($user_name), 218 'comment_author_email' => $user_email, 219 'comment_author_url' => $user_url, 220 'comment_content' => $content, 221 221 'comment_author_IP' => '', 222 'comment_type' => '', //empty for regular comments, 'pingback' for pingbacks, 'trackback' for trackbacks223 'comment_parent' => $parent_id, //0 if it's not a reply to another comment; if it's a reply, mention the parent comment ID here224 'comment_approved' => $approved ?0:1, // Whether the comment has been approved225 'user_id' => $user_id , //passing current user ID or any predefined as per the demand222 'comment_type' => '', 223 'comment_parent' => $parent_id, 224 'comment_approved' => $approved ? 0 : 1, 225 'user_id' => $user_id 226 226 ); 227 227 $comment_id = wp_insert_comment( $commentarr ); -
wp-mini-program/trunk/router/comments.php
r2471362 r2471376 214 214 if($type == 'comment') { 215 215 $commentarr = array( 216 'comment_post_ID' => $post_id, // to which post the comment will show up217 'comment_author' => ucfirst($user_name), //fixed value - can be dynamic218 'comment_author_email' => $user_email, //fixed value - can be dynamic219 'comment_author_url' => $user_url, //fixed value - can be dynamic220 'comment_content' => $content, //fixed value - can be dynamic216 'comment_post_ID' => $post_id, 217 'comment_author' => ucfirst($user_name), 218 'comment_author_email' => $user_email, 219 'comment_author_url' => $user_url, 220 'comment_content' => $content, 221 221 'comment_author_IP' => '', 222 'comment_type' => '', //empty for regular comments, 'pingback' for pingbacks, 'trackback' for trackbacks223 'comment_parent' => $parent_id, //0 if it's not a reply to another comment; if it's a reply, mention the parent comment ID here224 'comment_approved' => $approved ?0:1, // Whether the comment has been approved225 'user_id' => $user_id , //passing current user ID or any predefined as per the demand222 'comment_type' => '', 223 'comment_parent' => $parent_id, 224 'comment_approved' => $approved ? 0 : 1, 225 'user_id' => $user_id 226 226 ); 227 227 $comment_id = wp_insert_comment( $commentarr );
Note: See TracChangeset
for help on using the changeset viewer.