WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#18228 closed defect (bug) (fixed)

Only add the post format body classes when the post type supports post formats

Reported by: ocean90 Owned by: duck_
Milestone: 3.3 Priority: normal
Severity: normal Version: 3.1
Component: General Keywords: has-patch
Focuses: Cc:

Description

Same as #16224 and r17292 but this time for the body class.

Attachments (1)

18228.patch (900 bytes) - added by ocean90 4 years ago.

Download all attachments as: .zip

Change History (5)

@ocean904 years ago

comment:1 @kawauso4 years ago

get_post_format() already performs a post_type_supports() check and returns false as of r17429.

comment:2 @ocean904 years ago

  • Milestone changed from Awaiting Review to 3.3

That's right, but it returns also false if get_the_terms is empty.

comment:3 @kawauso4 years ago

Ah, missed the else clause.

comment:4 @duck_4 years ago

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

In [18651]:

Only add the post format body classes when the post type supports post formats. props ocean90. fixes #18228.

Note: See TracTickets for help on using tickets.