Skip to content

Commit

Permalink
Merge pull request #59 from jeherve/1745434-sender-share-email
Browse files Browse the repository at this point in the history
Sharing: add Sender data to share by email
  • Loading branch information
blobaugh committed Jan 9, 2014
2 parents 2fa41fe + 5ffd810 commit 1cace2b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions modules/sharedaddy/sharedaddy.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ function sharing_email_send_post( $data ) {
$content .= $data['post']->post_title."\n";
$content .= get_permalink( $data['post']->ID )."\n";

wp_mail( $data['target'], '['.__( 'Shared Post', 'jetpack' ).'] '.$data['post']->post_title, $content );
$headers[] = sprintf( 'From: %1$s <%2$s>', $data['name'], $data['source'] );

wp_mail( $data['target'], '['.__( 'Shared Post', 'jetpack' ).'] '.$data['post']->post_title, $content, $headers );
}

function sharing_add_meta_box() {
Expand Down Expand Up @@ -148,4 +150,4 @@ function sharing_email_check( $true, $post, $data ) {
if ( defined( 'RECAPTCHA_PRIVATE_KEY' ) ) {
add_action( 'sharing_email_dialog', 'sharing_email_dialog' );
add_filter( 'sharing_email_check', 'sharing_email_check', 10, 3 );
}
}

0 comments on commit 1cace2b

Please sign in to comment.