Opened 15 years ago
Closed 15 years ago
#11439 closed defect (bug) (fixed)
get_body_class() does unnecessary work
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 3.0 | Priority: | normal |
Severity: | normal | Version: | 2.9 |
Component: | Template | Keywords: | has-patch tested |
Focuses: | Cc: |
Description
get_blog_class() calls setup_postdata() unnecessarily, when there's an API in WP_Query for exactly this purpose.
Patch fixes.
Attachments (3)
Change History (13)
#3
@
15 years ago
- Keywords tested removed
My patch is wrong, global $wpdb is still needed and should not be removed.
#5
@
15 years ago
- Keywords needs-patch added; has-patch removed
I also get a fatal error when I apply it.
#6
@
15 years ago
I incorporated Denis's suggestion for handling private pages, fixed the fatal error, but left out the unrelated stuff that Denis has in 11439.diff.
unnecessary_global_tampering.11439.diff should be the best patch now. Agreed?
Note: See
TracTickets for help on using
tickets.
Tested against current head. Works. Then I reviewed the code and
AND post_status != 'private'
looks to me like this fixes some other bug. I have created an additional patch w/o that segment. If applied, a new ticket might be created based on the finding by filosofo.