Mail text until More tag
-
Everything works fine for the past couple of weeks. Great job!
I would like to ask you to consider adding the option to include text until the More tag in the emails. I have added the code for it myself and it’s working great. I’ve tested it for the past three weeks without any problems. I can’t imagine I’m the only one using the More tag. The advantage is that you have more control over what you add to the email.
In es-sendmail.php I have added (around line 354):
// Get post until more tag $text_until_more_tag = get_extended ($post->post_content); $until_more_tag = $text_until_more_tag['main']; $until_more_tag = strip_tags(strip_shortcodes($until_more_tag)); if ( (function_exists('has_post_thumbnail')) && (has_post_thumbnail($post_id)) ) { $post_thumbnail = get_the_post_thumbnail($post_id, 'full'); } if($post_thumbnail <> "") { $post_thumbnail_link = "<a href='".$post_link."' target='_blank'>".$post_thumbnail."</a>"; } $content = str_replace('###POSTLINK-ONLY###', $post_link, $content); if($post_link <> "") { $post_link_with_title = "<a href='".$post_link."' target='_blank'>".$post_title."</a>"; $content = str_replace('###POSTLINK-WITHTITLE###', $post_link_with_title, $content); $post_link = "<a href='".$post_link."' target='_blank'>".$post_link."</a>"; } $content = str_replace('###POSTTITLE###', $post_title, $content); $content = str_replace('###POSTLINK###', $post_link, $content); $content = str_replace('###POSTIMAGE###', $post_thumbnail_link, $content); $content = str_replace('###POSTDESC###', $the_excerpt, $content); $content = str_replace('###POSTMORETAG###', $until_more_tag, $content); $content = str_replace('###POSTFULL###', $post_full, $content); $content = str_replace('###DATE###', $post_date, $content); break;
I’ve also added the ###POSTMORETAG### writing in compose-add.php and compose-edit.php so I won’t forget the tag.
I hope you would consider it. It’s only a small addition to the plugin, but it makes it more complete.
- The topic ‘Mail text until More tag’ is closed to new replies.