Make WordPress Core

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#55785 closed defect (bug) (fixed)

Docs: Wrong `@property-read` notation type in `WP_Post`.

Reported by: omaeyusuke's profile omaeyusuke Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 6.1 Priority: normal
Severity: normal Version: 4.2
Component: Posts, Post Types Keywords: has-patch
Focuses: docs Cc:


The type correct one for $post->post_category is int[].
Also, $post->tag_input is a typo for $post->tags_input and the correct type is string[].

Change History (4)

This ticket was mentioned in PR #2737 on WordPress/wordpress-develop by yusuke-omae.

2 years ago

  • Keywords has-patch added

fix type and name for @property-read.

Trac ticket: #55785

#2 @SergeyBiryukov
2 years ago

  • Milestone changed from Awaiting Review to 6.1
  • Version changed from 5.9.3 to 4.2

Hi there, welcome to WordPress Trac!

Thanks for the ticket, the changes look correct. Introduced in [31127] / #30799, setting the version accordingly.

#3 @SergeyBiryukov
2 years ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 53428:

Docs: Correct the type for WP_Post::$post_category and ::$tags_input.

These properties are arrays of category IDs and tag names, respectively, not a single integer or string.

Follow-up to [21651], [31127], [32729], [48941].

Props omaeyusuke.
Fixes #55785.

Note: See TracTickets for help on using tickets.