Plugin Directory

Changeset 2471376


Ignore:
Timestamp:
02/09/2021 07:46:52 AM (5 years ago)
Author:
imahui
Message:

version 1.3.7

Location:
wp-mini-program
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wp-mini-program/tags/1.3.7/router/comments.php

    r2471362 r2471376  
    214214        if($type == 'comment') {
    215215            $commentarr = array(
    216                 'comment_post_ID' => $post_id, // to which post the comment will show up
    217                 'comment_author' => ucfirst($user_name), //fixed value - can be dynamic
    218                 'comment_author_email' => $user_email, //fixed value - can be dynamic
    219                 'comment_author_url' => $user_url, //fixed value - can be dynamic
    220                 'comment_content' => $content, //fixed value - can be dynamic
     216                '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,
    221221                'comment_author_IP' => '',
    222                 'comment_type' => '', //empty for regular comments, 'pingback' for pingbacks, 'trackback' for trackbacks
    223                 'comment_parent' => $parent_id, //0 if it's not a reply to another comment; if it's a reply, mention the parent comment ID here
    224                 'comment_approved' => $approved?0:1, // Whether the comment has been approved
    225                 'user_id' => $user_id, //passing current user ID or any predefined as per the demand
     222                'comment_type' => '',
     223                'comment_parent' => $parent_id,
     224                'comment_approved' => $approved ? 0 : 1,
     225                'user_id' => $user_id
    226226            );
    227227            $comment_id = wp_insert_comment( $commentarr );
  • wp-mini-program/trunk/router/comments.php

    r2471362 r2471376  
    214214        if($type == 'comment') {
    215215            $commentarr = array(
    216                 'comment_post_ID' => $post_id, // to which post the comment will show up
    217                 'comment_author' => ucfirst($user_name), //fixed value - can be dynamic
    218                 'comment_author_email' => $user_email, //fixed value - can be dynamic
    219                 'comment_author_url' => $user_url, //fixed value - can be dynamic
    220                 'comment_content' => $content, //fixed value - can be dynamic
     216                '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,
    221221                'comment_author_IP' => '',
    222                 'comment_type' => '', //empty for regular comments, 'pingback' for pingbacks, 'trackback' for trackbacks
    223                 'comment_parent' => $parent_id, //0 if it's not a reply to another comment; if it's a reply, mention the parent comment ID here
    224                 'comment_approved' => $approved?0:1, // Whether the comment has been approved
    225                 'user_id' => $user_id, //passing current user ID or any predefined as per the demand
     222                'comment_type' => '',
     223                'comment_parent' => $parent_id,
     224                'comment_approved' => $approved ? 0 : 1,
     225                'user_id' => $user_id
    226226            );
    227227            $comment_id = wp_insert_comment( $commentarr );
Note: See TracChangeset for help on using the changeset viewer.