[wp-hackers] post processing weirdness
    Mark Jaquith 
    mark.wordpress at txfx.net
       
    Sun Jun 26 20:53:11 GMT 2005
    
    
  
Scott Merrill wrote:
> Ryan Boren wrote:
>
>> On Sat, 2005-06-25 at 16:48 -0400, Scott Merrill wrote:
>>
>>> So I went to look at get_posts().  Duh -- it accepts a query string 
>>> formatted parameter!
>>>
>>> So, are we in fact missing a get_post() function, which accepts the 
>>> post ID of a post to fetch?
>>
>>
>>
>> get_post() is in functions.php and accepts either a post ID or a
>> reference to an existing post object.
>
>
> /me opens mouth and inserts foot.
>
> Thanks.
>
A few thoughts:
Drafts should not have permalinks.  First, they're drafts, so there's 
nothing "perma" about them, just on a conceptual level.  Second, unless 
you manually specify a slug, the slug is not created until you publish 
the post, and can (and should) be changed by the user.
What should happen, though, is that the permalink is created before the 
publish_post action goes out.  This is not always the case, and that's a 
bug.
    
    
More information about the wp-hackers
mailing list