Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#35225 closed enhancement (fixed)

Incorrect documentation for get_post_types()

Reported by: barryceelen's profile barryceelen Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 4.5 Priority: normal
Severity: normal Version: 4.1
Component: Posts, Post Types Keywords:
Focuses: Cc:

Description

The documentation for get_post_types() incorrectly states that the function accepts 'or' or 'and' as its $operator.

It uses the wp_filter_object_list() function, which in turn uses the wp_list_filter() function, which both accept the 'not' operator. Since there is nothing in the get_post_types() function preventing use of the 'not' operator it supports the 'not' operator as well.

Attachments (1)

35225.diff (1.6 KB) - added by barryceelen 7 years ago.
Fix wp_filter_object_list() and get_post_types() documentation.

Download all attachments as: .zip

Change History (5)

@barryceelen
7 years ago

Fix wp_filter_object_list() and get_post_types() documentation.

#1 @SergeyBiryukov
7 years ago

In 36090:

Docs: Clarify that wp_filter_object_list() accepts 'not' as its $operator parameter.

Props barryceelen.
See #35225.

#2 @SergeyBiryukov
7 years ago

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

In 36091:

Docs: Clarify that get_post_types() accepts 'not' as its $operator parameter.

Props barryceelen.
Fixes #35225.

#3 @SergeyBiryukov
7 years ago

  • Milestone changed from Awaiting Review to 4.5

#4 @johnbillion
7 years ago

  • Version changed from trunk to 4.1
Note: See TracTickets for help on using tickets.