Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sharing : Add wp_sharing_email_send_post_subject filter #8284

Merged
merged 6 commits into from
Jan 25, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
*
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add @since 5.7.0 here too?

* @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