Make WordPress Core

Opened 9 years ago

Closed 5 years ago

#42117 closed enhancement (fixed)

Move inline docs from register_post_type() to WP_Post_Type::set_props()

Reported by: birgire Owned by:
Priority: normal Milestone: 5.7
Component: Posts, Post Types Version: 4.6
Severity: normal Keywords: has-patch
Cc: Focuses: docs

Description

The function register_post_type() is a wrapper for a WP_Post_Type object, since version 4.6.

The method WP_Post_Type::set_props() is missing the detailed documentation for each argument, that is present for register_post_type().

So to avoid duplication, it looks like we should move it.

Attachments (3)

42117.diff​ (23.2 KB ) - added by birgire 9 years ago.
42117.2.diff​ (23.1 KB ) - added by birgire 9 years ago.
42117.3.diff​ (22.6 KB ) - added by birgire 9 years ago.

Download all attachments as: .zip

Change History (5)

#1 @birgire
9 years ago

  • Keywords has-patch added

Moved it in 42117.2.diff​

Wasn't sure though, how to handle the @since part,
but I moved only the parts that I thought were relevant.

#2 @SergeyBiryukov
5 years ago

  • Milestone Awaiting Review → 5.7
  • Resolution → fixed
  • Status new → closed

Hi there, thanks for the patch! Sorry it took so long for someone to get back to you.

Since register_post_type() is the public API here, I think it makes sense to flip this around and add a reference to register_post_type() in the documentation for WP_Post_Type::set_props(). Looks like that was already done in [49790] / #51800.

Note: See TracTickets for help on using tickets.