[wp-trac] [WordPress Trac] #21641: Filter on pending/draft array in wp_insert_post()

WordPress Trac wp-trac at lists.automattic.com
Mon Aug 20 16:53:56 UTC 2012


#21641: Filter on pending/draft array in wp_insert_post()
-------------------------+-----------------------------
 Reporter:  villagora    |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  General      |    Version:
 Severity:  normal       |   Keywords:
-------------------------+-----------------------------
 Hi

 In wp_insert_post() function, there is no possibility to add a status to
 the list of status for which postname can be set to empty (no filter).
 Thus, to have the 'pending' like behaviour for a custom status it seems
 you have to update the postname to '' and the gmt to 000-00 after the
 insert, as you have to hack the permalink construction too.

 In the same way, it would be nice to add the $post parameter to the filter
 'display_post_states' in the '_post_states($post)' function (wp-
 admin/includes/template.php), in order to add easily a post state
 according to a custom status of the post (seems better as retrieving the
 global $post of the admin loop).

 Hope these are real issues. Sorry if not.

 Regards

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/21641>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list