Forum Replies Created

Viewing 1 replies (of 1 total)
  • It’s a kludgy hack, but this worked for me:

    In wp-mail.php:

    After

    // Captures any text in the body after $phone_delim as the body
            $content = explode($phone_delim, $content);
            $content[1] ? $content = $content[1] : $content = $content[0];
    
            $content = trim($content);

    Insert

    if ( strpos(" " . $content,"#END#") > 0 ) {
              $content = substr($content,0,strpos($content,"#END#"));
            }

    Before

    $post_content = apply_filters('phone_content', $content);
    
            $post_title = xmlrpc_getposttitle($content);

    Then when you email a post, just include “#END#” (without the quotes) at the end of the post content. Everything after #END# will be removed.

    You could use “—–“, “Free stuff for your email! Click here” or anything else, if you want. Just make sure whatever you use will not appear in a desired location in your emailed post.

    Obviously, this assumes that you have the ability to modify the sent email, or at least can find a consistent sig in it.

    BTW, I realize the if… logic could be simplified to a single line, but I was trying for clarity, not code brevity.

Viewing 1 replies (of 1 total)