Plugin Directory

Changeset 1895651


Ignore:
Timestamp:
06/20/2018 08:32:26 AM (8 years ago)
Author:
oskarn97
Message:

update

Location:
appful/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • appful/trunk/appful.php

    r1895211 r1895651  
    44Plugin URI: https://appful.io/
    55Description: appful is one of the world's most remarkable & beautiful app service for Blogger and Online magazines. It is designed to create outstanding real native iOS and Android Apps based on the content of your Wordpress site or YouTube channel. appful is surprisingly simple to use and not a single line of code is required.
    6 Version: 1.0.106
     6Version: 1.0.107
    77Author: appful GmbH
    88Author URI: https://appful.io/
  • appful/trunk/models/comment.php

    r1895211 r1895651  
    7474            'comment_parent' => $_REQUEST["parent"],
    7575            'comment_author_IP' => $_REQUEST["ip"],
    76             'comment_agent' => $_REQUEST["user_agent"]
     76            'comment_agent' => $_REQUEST["user_agent"],
     77            'comment_date_gmt' => current_time( 'mysql', 1 ),
     78            'comment_date' => current_time('mysql')
    7779        );
    7880
    79         $comment_id = wp_new_comment($data, true);
    80         if(is_wp_error($comment_id)) {
    81             $response = array("status" => end(explode('comment_', array_keys($comment_id->errors)[0])), 'error' => array_values($comment_id->errors)[0]);
     81        $data = wp_filter_comment($data);
     82        $data['comment_approved'] = wp_allow_comment($data, true);
     83        if(is_wp_error($data['comment_approved'])) {
     84            $error = $data['comment_approved'];
     85            $response = array("status" => end(explode('comment_', array_keys($error->errors)[0])), 'error' => array_values($error->errors)[0]);
    8286            if($response['status'] != 'flood' || !get_option("appful_allow_commentflood", false)) {
    8387                $appful_api->response->respond($response);
     
    8589            }
    8690        }
     91
     92        $comment_id = wp_insert_comment($data);
     93        do_action('comment_post', $comment_id, $data['comment_approved'], $data);
    8794
    8895        $this->import_wp_object(get_comment($comment_id));
Note: See TracChangeset for help on using the changeset viewer.