[wp-trac] [WordPress Trac] #46761: Argument missing from 'register_post_type' codex docs

WordPress Trac noreply at wordpress.org
Tue Apr 2 08:41:46 UTC 2019


#46761: Argument missing from 'register_post_type' codex docs
-------------------------------+----------------------
 Reporter:  leec87             |       Owner:  (none)
     Type:  defect (bug)       |      Status:  closed
 Priority:  normal             |   Milestone:
Component:  Posts, Post Types  |     Version:
 Severity:  normal             |  Resolution:  invalid
 Keywords:                     |     Focuses:
-------------------------------+----------------------
Changes (by swissspidy):

 * status:  new => closed
 * resolution:   => invalid
 * milestone:  Awaiting Review =>


Comment:

 That "elaborate" example is missing much more labels than just
 `view_items` :-) I'd say it's easier to just point to the docs instead of
 listing all possible labels there.

 The good thing is: the codex is a wiki, which anyone can edit! So if you
 see an issue like this that you think is worth fixing, you can just log in
 with your WordPress.org username and edit the page.

 That being said, the source of truth for documentation is
 https://developer.wordpress.org/reference as we're slowly moving away from
 Codex.

 The relevant
 [https://developer.wordpress.org/reference/functions/register_post_type/
 documentation] for `register_post_type()` explicitly says this about the
 labels:

 `An array of labels for this post type. If not set, post labels are
 inherited for non-hierarchical types and page labels for hierarchical
 ones. See get_post_type_labels() for a full list of supported labels.`

 See
 https://developer.wordpress.org/reference/functions/get_post_type_labels/
 for the full list of labels.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/46761#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list