Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#31359 closed defect (bug) (fixed)

wp_insert_post documentation missing post_title

Reported by: atimmer's profile atimmer Owned by: drewapicture's profile DrewAPicture
Milestone: 4.2 Priority: normal
Severity: trivial Version: 4.2
Component: Posts, Post Types Keywords: has-patch commit
Focuses: docs Cc:

Description

The documentation for the $postarr for wp_insert_post is missing post_title as an argument.

Attachments (4)

31359.diff (749 bytes) - added by atimmer 10 years ago.
31359.2.diff (2.8 KB) - added by atimmer 10 years ago.
31359.3.diff (3.6 KB) - added by atimmer 10 years ago.
31359.4.diff (3.7 KB) - added by atimmer 10 years ago.

Download all attachments as: .zip

Change History (18)

@atimmer
10 years ago

#1 @atimmer
10 years ago

  • Keywords has-patch added
  • Severity changed from normal to trivial

31359.diff adds post_title to the documentation.

#2 @SergeyBiryukov
10 years ago

  • Component changed from General to Posts, Post Types
  • Milestone changed from Awaiting Review to 4.2

#3 @SergeyBiryukov
10 years ago

Seems like post_content is missing too.

#4 @SergeyBiryukov
10 years ago

We should probably synchronize that block with the list of fields in the wp_posts table:

ID
post_author
post_date
post_date_gmt
post_content
post_title
post_excerpt
post_status
comment_status
ping_status
post_password
post_name
to_ping
pinged
post_modified
post_modified_gmt
post_content_filtered
post_parent
guid
menu_order
post_type
post_mime_type
comment_count

#5 @atimmer
10 years ago

  • Keywords needs-patch added; has-patch removed

Great idea, I will look further into this with more time.

@atimmer
10 years ago

#6 follow-up: @atimmer
10 years ago

  • Keywords has-patch added; needs-patch removed

31359.2.diff adds all missing possibilities. I would love feedback on the textual content, I tried to mimic the pre-existing documentation.

I wonder if we should order all the variables the same way they are ordered in the database. Thoughts?

#7 in reply to: ↑ 6 @SergeyBiryukov
10 years ago

Replying to atimmer:

I wonder if we should order all the variables the same way they are ordered in the database. Thoughts?

I would expect that, yes.

@atimmer
10 years ago

#8 @atimmer
10 years ago

31359.3.diff is the same as 31359.2.diff except that the documentation is ordered the same way as the database.

#9 @SergeyBiryukov
10 years ago

$comment_status and $ping_status should be changed to string, they can be 'open' or 'closed'. Apparently this was an oversight in [25628].

Looks good to me otherwise.

@atimmer
10 years ago

#11 @SergeyBiryukov
10 years ago

  • Keywords commit added

#12 @DrewAPicture
10 years ago

  • Owner set to DrewAPicture
  • Status changed from new to reviewing

#13 @DrewAPicture
10 years ago

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

In 31486:

Clarify and complete default argument documentation for wp_insert_post().

Props atimmer, SergeyBiryukov.
Fixes #31359.

#14 @SergeyBiryukov
10 years ago

In 31496:

Remove a stray single quote in wp_insert_post() documentation.

see #31359.

Note: See TracTickets for help on using tickets.