[wp-hackers] $args for register_post_status()?

Mike Schinkel mikeschinkel at newclarity.net
Wed Jun 2 02:14:57 UTC 2010


Hi all,

I've been trying to find docs on the $args for register_post_status() somewhere and I can't find anything definitive on Codex or elsewhere.  The code documents three (3) potential $args values:

    * label - A descriptive name for the post status marked for translation. Defaults to $post_status.
    * public - Whether posts of this status should be shown in the admin UI. Defaults to true.
    * exclude_from_search - Whether to exclude posts with this post status from search results. Defaults to true.
    
but there are a lot more defined in the function:

    * label_count
    * exclude_from_search
    * capability_type
    * hierarchical
    * public
    * internal
    * protected
    * private
    * show_in_admin_all
    * publicly_queryable
    * show_in_admin_status_list
    * show_in_admin_all_list
    * single_view_cap

I've review the code in core that calls register_post_status() and can guess at the purpose of some of these in content, but not all. Many of these are "standard" $args names used in other parts of WordPress such as for register_post_type() but I'm wondering how they are relevent without having to trace through all the code for each of the properties. For example, what does "hierarchical" or "publicly_queryable" mean in the context of a status? Basically I need to define a custom status for a plugin and I'm just trying to figure out what I really need to set and what I can safely ignore. 
  
Thanks in advance for any help.
  
-Mike


More information about the wp-hackers mailing list