[wp-trac] [WordPress Trac] #27794: Always use visibility:private when creating new posts

WordPress Trac noreply at wordpress.org
Sun Apr 13 22:56:07 UTC 2014


#27794: Always use visibility:private when creating new posts
-------------------------------+------------------------------
 Reporter:  SkyHiRider         |       Owner:
     Type:  enhancement        |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Posts, Post Types  |     Version:  3.8.2
 Severity:  normal             |  Resolution:
 Keywords:                     |     Focuses:
-------------------------------+------------------------------
Changes (by SergeyBiryukov):

 * type:  feature request => enhancement
 * component:  Security => Posts, Post Types


Comment:

 A workaround:
 {{{
 function set_default_post_status_27794() {
         if ( 'auto-draft' === $GLOBALS['post']->post_status ) {
                 $GLOBALS['post']->post_status = 'private';
         }
 }
 add_action( 'do_meta_boxes', 'set_default_post_status_27794' );
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/27794#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list