WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#34452 closed defect (bug) (fixed)

body_class docblock parameter description incorrect

Reported by: JPry Owned by: SergeyBiryukov
Milestone: 4.4 Priority: normal
Severity: minor Version: 2.8
Component: Posts, Post Types Keywords: has-patch commit
Focuses: docs Cc:

Description

For the body_class filter, the $class variable is described as a string when in fact it is an array.

Attachments (1)

34452.patch (620 bytes) - added by JPry 5 years ago.
Fix body_class docblock

Download all attachments as: .zip

Change History (7)

@JPry
5 years ago

Fix body_class docblock

#1 @JPry
5 years ago

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

#2 @swissspidy
5 years ago

  • Component changed from General to Themes
  • Keywords commit added
  • Milestone changed from Awaiting Review to 4.4
  • Version changed from trunk to 2.8

#3 @SergeyBiryukov
5 years ago

  • Component changed from Themes to Posts, Post Types
  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

#4 @SergeyBiryukov
5 years ago

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

In 35398:

Docs: Correct $class parameter type and description for body_class filter.

Props JPry.
Fixes #34452.

#5 @SergeyBiryukov
5 years ago

In 35399:

In get_post_class(), ensure that we always coerce the class list passed to the function to an array, even when it's empty.

This is consistent with get_body_class(), see [18176].

See #34452.

#6 @SergeyBiryukov
5 years ago

In 35400:

Docs: After [35399], correct $class parameter type and description for post_class filter.

See #34452.

Note: See TracTickets for help on using tickets.