WordPress.org

Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#12644 closed defect (bug) (fixed)

docs missing for register_post_type()/add_post_type_support() feature supports

Reported by: sillybean Owned by: nacin
Milestone: 3.0 Priority: normal
Severity: normal Version: 3.0
Component: Inline Docs Keywords:
Focuses: Cc:
PR Number:

Description

The inline documentation for register_post_type() mentions the 'supports' argument and refers the reader to the add_post_type_support() docs... but there's nothing there. This is rather problematic for custom post type developers now that author, editor, and title are all optional.

I've pieced together what I think is a complete list of supported features for custom post types. Please double check me!

Attachments (2)

supports.diff (780 bytes) - added by sillybean 10 years ago.
supports2.diff (1.1 KB) - added by sillybean 10 years ago.
corrected list of supports arguments, with explanations where necessary

Download all attachments as: .zip

Change History (9)

@sillybean
10 years ago

#1 follow-up: @sillybean
10 years ago

Just let me know if there's anything missing. I'll add descriptions of each one later.

#2 @sillybean
10 years ago

  • Cc steph@… added

#3 in reply to: ↑ 1 @nacin
10 years ago

  • Milestone changed from Unassigned to 3.0
  • Status changed from new to accepted

Replying to sillybean:

Just let me know if there's anything missing. I'll add descriptions of each one later.

Based on a quick grep of 'post_type_supports', it looks like you caught them all.

#4 @unsalkorkmaz
10 years ago

  • Cc unsalkorkmaz added

post-thumbnails or thumbnail?
i am checking post and page register_post_type structure and both using thumbnail. If post-thumbnails is supported one, what is difference?

(sorry for newbie question, bad english)

#5 @sillybean
10 years ago

unsalkorkmaz -- very good catch. It's 'thumbnail'.

@sillybean
10 years ago

corrected list of supports arguments, with explanations where necessary

#6 @mikeschinkel
10 years ago

  • Cc mikeschinkel@… added

Related: #12676

#7 @nacin
10 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

(In [13985]) Add docs to add_post_type_support(). fixes #12644, props sillybean.

Note: See TracTickets for help on using tickets.