Changeset 1065578
- Timestamp:
- 01/12/2015 04:06:44 AM (11 years ago)
- Location:
- because/trunk
- Files:
-
- 2 edited
-
public/includes/class-sp_comments.php (modified) (4 diffs)
-
social-polling.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
because/trunk/public/includes/class-sp_comments.php
r1038441 r1065578 82 82 83 83 add_action('comment_post', array( $this,'check_user_vote')); 84 85 add_action('comment_post', array( $this,'add_subscription')); 86 87 add_action('comment_post', array( $this,'notify_email')); 88 89 84 90 85 91 … … 177 183 $query = "SELECT meta_key FROM $table WHERE post_id='" . $post_id . "' AND meta_value='" . $vote_val->vote_value . "'"; 178 184 $ans_choice = $wpdb->get_row($query); 179 add_comment_meta($comment_id,'test','test');180 185 181 186 // add vote identifier to the comment … … 189 194 } 190 195 196 public function add_subscription($comment_id){ 197 global $wpdb; 198 199 if ($_POST['subscribe_comments']=="yes"){ 200 201 add_comment_meta($comment_id,'subscribed','yes'); 202 } 203 } 204 205 public function notify_email($comment_id){ 206 $comment = get_comment($comment_id); 207 208 if ('0' != $comment->comment_parent){ 209 $a = get_comment_meta($comment->comment_parent,'subscribed',true); 210 211 if(get_comment_meta($comment->comment_parent,'subscribed',true)=="yes"){ 212 $parent_comment = get_comment($comment->comment_parent); 213 214 $message = "Someone has replied to your comment on the post: '" . get_the_title() . "'!\n\n" . 215 "You can view the comment at the following link: " . 216 get_post_permalink() . "#comment-" . $comment_id; 217 218 219 220 wp_mail( $parent_comment->comment_author_email, 'You have a reply to your wordpress comment!', $message ); 221 222 223 224 225 } 226 227 228 229 } 230 } 191 231 192 232 /** … … 1480 1520 1481 1521 <input type="hidden" name="comment" id="thecomment_field" value="socialpolling_verb" readonly="readonly" /> 1522 <input type="checkbox" name="subscribe_comments" id="subscribe_comments" value="yes"> 1523 <label for="subscribe_comments">Do you want to be emailed if someone replies to your comment?</label> 1482 1524 1483 1525 <?php -
because/trunk/social-polling.php
r1038441 r1065578 21 21 * @link http://www.teambecause.com 22 22 23 * @copyright 2014 TeamBecauseLLC23 * @copyright 2014 Conva LLC 24 24 25 25 * … … 27 27 * @wordpress-plugin 28 28 29 * Plugin Name: Because30 31 * Plugin URI: www. teambecause.com32 33 * Description: Becauseis a new commenting platform that increases audience engagement by providing new avenues for channelling audience discussions.29 * Plugin Name: Conva 30 31 * Plugin URI: www.conva.us 32 33 * Description: Conva is a new commenting platform that increases audience engagement by providing new avenues for channelling audience discussions. 34 34 35 35 <<<<<<< .mine 36 * Version: 1. 5.336 * Version: 1.6 37 37 ======= 38 * Version: 1. 5.338 * Version: 1.6 39 39 >>>>>>> .r969865 40 40
Note: See TracChangeset
for help on using the changeset viewer.