WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#10361 closed enhancement (invalid)

Needless query in get_body_class()

Reported by: Denis-de-Bernardy Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.8
Component: Optimization Keywords: has-patch
Focuses: Cc:

Description

See attached patch.

Isn't the ancestors field always filled now?

Attachments (1)

10361.diff (522 bytes) - added by Denis-de-Bernardy 6 years ago.

Download all attachments as: .zip

Change History (3)

@Denis-de-Bernardy6 years ago

comment:2 @westi6 years ago

  • Milestone 2.9 deleted
  • Resolution set to invalid
  • Status changed from new to closed

I don't think that var is currently setup when querying.

You would need to call get_post_ancestors().

Anyway this code is seeing if we have any children not any ancestors and marking us as a parent.

Closing as INVALID.

Note: See TracTickets for help on using tickets.