Changeset 1895651
- Timestamp:
- 06/20/2018 08:32:26 AM (8 years ago)
- Location:
- appful/trunk
- Files:
-
- 2 edited
-
appful.php (modified) (1 diff)
-
models/comment.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
appful/trunk/appful.php
r1895211 r1895651 4 4 Plugin URI: https://appful.io/ 5 5 Description: 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.10 66 Version: 1.0.107 7 7 Author: appful GmbH 8 8 Author URI: https://appful.io/ -
appful/trunk/models/comment.php
r1895211 r1895651 74 74 'comment_parent' => $_REQUEST["parent"], 75 75 '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') 77 79 ); 78 80 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]); 82 86 if($response['status'] != 'flood' || !get_option("appful_allow_commentflood", false)) { 83 87 $appful_api->response->respond($response); … … 85 89 } 86 90 } 91 92 $comment_id = wp_insert_comment($data); 93 do_action('comment_post', $comment_id, $data['comment_approved'], $data); 87 94 88 95 $this->import_wp_object(get_comment($comment_id));
Note: See TracChangeset
for help on using the changeset viewer.