[wp-trac] [WordPress Trac] #26277: Codex entry on "register post type" has incorrect information
WordPress Trac
noreply at wordpress.org
Wed Nov 27 00:58:44 UTC 2013
#26277: Codex entry on "register post type" has incorrect information
---------------------------+------------------------------
Reporter: beowulfenator | Owner:
Type: defect (bug) | Status: closed
Priority: normal | Milestone: Awaiting Review
Component: Permalinks | Version:
Severity: normal | Resolution: invalid
Keywords: needs-codex |
---------------------------+------------------------------
Changes (by SergeyBiryukov):
* keywords: => needs-codex
Comment:
That article documents the parameters for `register_post_type()`, not for
`add_permastruct()`.
For `register_post_type()`, the parameters were correct.
As documented in the [source:tags/3.7.1/src/wp-includes/post.php#L1150
inline docs], it's `feeds` and `pages` there, not `feed` and `paged`:
[source:tags/3.7.1/src/wp-includes/post.php#L1275]
In line 1316, `$permastruct_args['feeds']` is mapped to
`$permastruct_args['feed']`:
[source:tags/3.7.1/src/wp-includes/post.php#L1315]
Not sure why `pages` is not mapped, but it appears to be handled above.
Probably worth investigating further.
I've reverted the Codex change since it's incorrect.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/26277#comment:6>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list