Post by email problem
-
I m having some issues when posting by email using Gmail. When I forward an email to the Jetpack generated email address, because of the text that is added to the email:
———- Forwarded message ———-
From: me <[email protected]>
Date: Sun, Oct 13, 2013 at 7:53 AM
Subject: My title
To: [email protected]The post gets published even though the status is draft.
[title My title] [status draft]
I tried stripping everything before
[title
, which works when publishing a post from the dashboard, but when I forward the email the post still gets published and I really don’t want it to do that.//strip unwanted text/code from posts function changePost($data, $postarr) { $da_content = $postarr['post_content']; if (strpos($da_content,'[title') !== false) { $data['post_content'] = strstr( $postarr['post_content'], '[title' ); } return $data; } add_filter('wp_insert_post_data','changePost','99',2);
Any ideas on how to delete the Gmail forward text message? I checked on the gmail forum, but they said I have to do it manually, and that’s something I don’t want to do either.
- The topic ‘Post by email problem’ is closed to new replies.