Changeset 1895211
- Timestamp:
- 06/19/2018 03:33:25 PM (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
r1864976 r1895211 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 56 Version: 1.0.106 7 7 Author: appful GmbH 8 8 Author URI: https://appful.io/ -
appful/trunk/models/comment.php
r1864977 r1895211 57 57 add_action('comment_on_draft', array(&$this, 'comment_on_draft')); 58 58 add_filter('comment_post_redirect', array(&$this, 'comment_post_redirect')); 59 add_action('comment_flood_trigger', array(&$this, 'comment_flood'));60 add_action('comment_duplicate_trigger', array(&$this, 'comment_flood'));59 //add_action('comment_flood_trigger', array(&$this, 'comment_flood')); 60 //add_action('comment_duplicate_trigger', array(&$this, 'comment_flood')); 61 61 //add_filter('comment_flood_filter', '__return_false'); 62 62 … … 74 74 'comment_parent' => $_REQUEST["parent"], 75 75 'comment_author_IP' => $_REQUEST["ip"], 76 'comment_agent' => $_REQUEST["user_agent"], 77 'comment_date' => current_time('mysql'), 78 'comment_approved' => get_option("comment_moderation") == 0 ? 1:0, 76 'comment_agent' => $_REQUEST["user_agent"] 79 77 ); 80 78 81 82 if(!get_option("appful_allow_commentflood", false)) wp_allow_comment($data); 83 $comment_id = wp_insert_comment($data); 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]); 82 if($response['status'] != 'flood' || !get_option("appful_allow_commentflood", false)) { 83 $appful_api->response->respond($response); 84 die(); 85 } 86 } 84 87 85 88 $this->import_wp_object(get_comment($comment_id));
Note: See TracChangeset
for help on using the changeset viewer.