Can someone help me with this? I have spent hours trying to find a way to send the featured post image along with the email sent via the email sharing button.
I know the new code to get the image goes within this line of code
function sharing_email_send_post( $data ) {
$content = sprintf( __( '%1$s (%2$s) thinks you may be interested in the following post:'."\n\n", 'jetpack' ), $data['name'], $data['source'] );
$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 );
}
What is the code I need to add to this so that the featured image from the post is sent along with the post name and link?