• i’m trying to hack the ‘Chech/Hewitt’ enhanced post-by-mail plugin so that it posts with status ‘draft’ rather than ‘publish’. this seems harder than expected. if i hack the record its sending to the database to include

    post_staus => ‘draft’

    then the post shows up in the database , but not in the web interface.

    from reading the API docs, it seems that the publish_post hook (as in

    do_action(‘publish_post’, $post_ID);

    ALWAYS sets publish status top ‘publish’. What’s the ‘recommended’ way to programattically post an entry and have it show up as a draft rather than a published post?

    thx

Viewing 2 replies - 1 through 2 (of 2 total)
  • set also post_author to one existing author ID:

    ‘post_status’ => draft,
    ‘post_author’ => 2,

    Thread Starter darrellberry

    (@darrellberry)

    of course! it was posting those as drafts for the user who emailed them in, not for the site admin (which i was logged in as) — obvious!

    thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘programatically posting drafts?’ is closed to new replies.