Allowing custom post status with no postname
-
Hi there,
I was adding my custom post status and, unless I really passed through something important, it seems very difficult to make it have an identical behaviour as the pending/draft ones.
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 hook, no filter). Then I update the post after that to erase the postname. But it appears the guid is set with the postname too, according to the behaviour of get_permalink() function called in wp_insert_post().
I think a solution is findable, but it would be much easier if a filter existed on the array( ‘draft’, ‘pending’, ‘auto-draft’ ) each time it is used in wp_insert_post(). Thus we would have the possibility to add our own custom type into this behaviour (no fancy guid and no postname till a custom validation).
Thanks in advance for your answers!
Cheers
The topic ‘Allowing custom post status with no postname’ is closed to new replies.