Skip to content

Commit

Permalink
Tweak email signature removal.
Browse files Browse the repository at this point in the history
  • Loading branch information
r-a-y committed Jul 4, 2013
1 parent a6e2770 commit 4792e87
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions includes/bp-rbe-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -735,8 +735,16 @@ function bp_rbe_remove_email_client_signature( $content ) {
// iterate!
++$i;

// strip from the beginning of the sig
$content = substr( $content, 0, strrpos( $content, $lines[$i] ) );
// find position of marker
$marker = strrpos( $content, $lines[$i] );

// if marker matches integer 0, remove the line preceding this one
if ( $marker === 0 ) {
$marker = strrpos( $content, $lines[$i-1] );
}

// get body until beginning of the sig
$content = substr( $content, 0, $marker );

}

Expand Down

0 comments on commit 4792e87

Please sign in to comment.