[wp-hackers] Custom Post Status

Mike Schinkel mikeschinkel at newclarity.net
Thu Aug 26 22:38:45 UTC 2010

On Aug 26, 2010, at 6:31 PM, Ryan Bilesky wrote:

> I want to setup a custom post status.  I did a google search, the results of
> which seem to point to there being a function to register a custom post
> status, that being register_post_status(), howver I see no mntion of this in
> the codex function refrence.  Can anyone confirm the existance of such a
> function, and at the very least where in the WP code it exists so I can look
> at it and see what arguments it requires.

register_post_status($status,$args) can be found on line 563 of /wp-includes/post.php

Here is the defaults for the $args array:

$defaults = array(
  'label' => false
  'label_count' => false
  'exclude_from_search' => null
  '_builtin' => false
  '_edit_link' => 'post.php?post=%d'
  'capability_type' => 'post'
  'hierarchical' => false
  'public' => null
  'internal' => null
  'protected' => null
  'private' => null
  'show_in_admin_all' => null
  'publicly_queryable' => null
  'show_in_admin_status_list' => null
  'show_in_admin_all_list' => null
  'single_view_cap' => null

Hope this helps.


More information about the wp-hackers mailing list