Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter Brad Salomons

    (@bradsalomons)

    For continuity of the thread, here is the code. I’m using the post-format type ‘video’ for my “live blog” type –only because I was using everything else for something else already. I don’t know if you need to do this, but it’s how I did it.

    Email This:
    
    Subject: video//12345
    Body: Lorum Ipsum #img1# Content, Content, Content!
    
    -------------
    
    function check_live_blog($post) {
    
    $format = get_post_format( $post['ID'] );
    
    if ($format == 'video'){
    $live_id = $post['post_title'];
    $original_post_content = get_post_field('post_content', $live_id );
    $updated_live = "<BR/><strong>".$post['post_date']."</strong><BR/><BR/>".$post['post_content']."<BR/>".$original_post_content;
    $live_post = array('ID' => $live_id, 'post_content' => $updated_live);
    wp_update_post( $live_post );
    $email_post = array('ID' => $post['ID'], 'post_status' => 'trash');
    wp_update_post( $email_post );
    }
    
    return $post;
    }
    
    add_filter('postie_post_after', 'check_live_blog');
Viewing 1 replies (of 1 total)