• I’m currently running WP 2.1 and would like to be able to change the default post status on the wp-admin/post-new.php page from ‘draft’ to ‘private’.

    I’ve looked at the ‘super secret options page’ at wp-admin/options.php?option_group_id=all, but I don’t see an obvious value for default post status.

    I’ve poked through the various .php pages, and I *think* it is pulling from the edit-form-advanced.php in the poststatusdiv fieldset, but I can’t quite see where/how to force it to default to private.

    The searches I’ve done so far on the subject have all come up with earlier versions of WP and the code pages that are described seem to be fairly different from what I have.

    Any help/insight greatly appreciated!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Have you gotten an answer to this? I’d be helped out by it.

    I figured it out, but I had to edit some core files, so do as I at your own risk (and know edits will have to be redone if you update wordpress). MAKE BACKUPS FIRST.

    Start in WP root directory. Find and edit:
    1. xmlrpc.php, replace all instances of “draft” with “private”. This will make posts made by outside sources (Google Docs, Word 2007, etc.) default to private as well.

    Go to wp-includes
    2. post.php line 535, under comment “made sure to set valid category”(`if ( empty($post_status) )
    $post_status = ‘draft’;`). If no post status is selected it will default to “draft”. Change this to “private”

    Go to wp-admin folder
    3. admin-functions.php line 370, under comment “Default post information to use when populating the “Write Post” form.” ($post->post_status = ‘draft’;). This defaults the checkbox on the “write post” form to private.

    That should be it. There is probably a way to write a plugin to do this, but I’m teaching myself php as I go.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WP 2.1 – Changing default post status’ is closed to new replies.