Skip to content

Commit

Permalink
Sharing : Add wp_sharing_email_send_post_subject filter (#8284)
Browse files Browse the repository at this point in the history
* add wp_sharing_email_send_post_subject filter

* Update sharedaddy.php

* Update sharedaddy.php

* Update sharedaddy.php

* Update sharedaddy.php

* Update sharedaddy.php
  • Loading branch information
Umangvaghela authored and zinigor committed Jan 25, 2018
1 parent 408f552 commit 1f7eccb
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion modules/sharedaddy/sharedaddy.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,18 @@ function sharing_email_send_post( $data ) {
// Make sure to pass the title through the normal sharing filters.
$title = $data['sharing_source']->get_share_title( $data['post']->ID );

wp_mail( $data['target'], '[' . __( 'Shared Post', 'jetpack' ) . '] ' . $title, $content, $headers );
/**
* Filter the Sharing Email Send Post Subject.
*
* @module sharedaddy
*
* @since 5.8.0
*
* @param string $var Sharing Email Send Post Subject. Default is "Shared Post".
*/
$subject = apply_filters( 'wp_sharing_email_send_post_subject', '[' . __( 'Shared Post', 'jetpack' ) . '] ' . $title );

wp_mail( $data['target'], $subject, $content, $headers );
}


Expand Down

0 comments on commit 1f7eccb

Please sign in to comment.