Changeset 1031012
- Timestamp:
- 11/23/2014 04:20:19 AM (11 years ago)
- Location:
- highfly
- Files:
-
- 3 edited
-
branches/2/comment.php (modified) (2 diffs)
-
tags/2.0/comment.php (modified) (2 diffs)
-
trunk/comment.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
highfly/branches/2/comment.php
r1031009 r1031012 16 16 add_filter( 'comment_notification_recipients', 17 17 array( $this, 'kick_redundant_recipients' ) ); 18 //Recipients may not be able to manage comments. But the default mail 19 //provides links to edit them. So we create a reduced mail message 18 20 19 add_filter( pre . 'comment_mail_body', array( $this, 'get_body' ), 10, 2 ); 21 20 add_filter( pre . 'comment_mail_subject', … … 53 52 } 54 53 55 /**56 * Adds all recipients to the default recipient list. MUST AXE CODE *-*57 */58 function add_other_comment_recipients( $emails, $comment_id ) {59 $comment = get_comment( $comment_id );60 $status = get_post_status( $comment->comment_post_ID );61 $do = $this->was_published( '', $status );62 if ( !apply_filters( pre . 'notify_comment', $do, $comment_id ) ) {63 return $emails;64 }65 66 $recipients = $this->get_recipients();67 foreach ( $emails as $default_address ) {68 if ( !in_array( $default_address, $recipients ) ) {69 $recipients[] = $default_address;70 }71 }72 return apply_filters( pre . 'comment_mail_recipients',73 $recipients, $comment_id );74 }75 76 54 function get_body( $body, $comment ) { 77 55 $body = $this->get_comment_line( $comment ) . "\n"; -
highfly/tags/2.0/comment.php
r1031009 r1031012 16 16 add_filter( 'comment_notification_recipients', 17 17 array( $this, 'kick_redundant_recipients' ) ); 18 //Recipients may not be able to manage comments. But the default mail 19 //provides links to edit them. So we create a reduced mail message 18 20 19 add_filter( pre . 'comment_mail_body', array( $this, 'get_body' ), 10, 2 ); 21 20 add_filter( pre . 'comment_mail_subject', … … 53 52 } 54 53 55 /**56 * Adds all recipients to the default recipient list. MUST AXE CODE *-*57 */58 function add_other_comment_recipients( $emails, $comment_id ) {59 $comment = get_comment( $comment_id );60 $status = get_post_status( $comment->comment_post_ID );61 $do = $this->was_published( '', $status );62 if ( !apply_filters( pre . 'notify_comment', $do, $comment_id ) ) {63 return $emails;64 }65 66 $recipients = $this->get_recipients();67 foreach ( $emails as $default_address ) {68 if ( !in_array( $default_address, $recipients ) ) {69 $recipients[] = $default_address;70 }71 }72 return apply_filters( pre . 'comment_mail_recipients',73 $recipients, $comment_id );74 }75 76 54 function get_body( $body, $comment ) { 77 55 $body = $this->get_comment_line( $comment ) . "\n"; -
highfly/trunk/comment.php
r1031009 r1031012 16 16 add_filter( 'comment_notification_recipients', 17 17 array( $this, 'kick_redundant_recipients' ) ); 18 //Recipients may not be able to manage comments. But the default mail 19 //provides links to edit them. So we create a reduced mail message 18 20 19 add_filter( pre . 'comment_mail_body', array( $this, 'get_body' ), 10, 2 ); 21 20 add_filter( pre . 'comment_mail_subject', … … 53 52 } 54 53 55 /**56 * Adds all recipients to the default recipient list. MUST AXE CODE *-*57 */58 function add_other_comment_recipients( $emails, $comment_id ) {59 $comment = get_comment( $comment_id );60 $status = get_post_status( $comment->comment_post_ID );61 $do = $this->was_published( '', $status );62 if ( !apply_filters( pre . 'notify_comment', $do, $comment_id ) ) {63 return $emails;64 }65 66 $recipients = $this->get_recipients();67 foreach ( $emails as $default_address ) {68 if ( !in_array( $default_address, $recipients ) ) {69 $recipients[] = $default_address;70 }71 }72 return apply_filters( pre . 'comment_mail_recipients',73 $recipients, $comment_id );74 }75 76 54 function get_body( $body, $comment ) { 77 55 $body = $this->get_comment_line( $comment ) . "\n";
Note: See TracChangeset
for help on using the changeset viewer.