#3430 closed enhancement (fixed)
wp_get_post_categories() to use $category_cache
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 2.1 | Priority: | high |
Severity: | normal | Version: | 2.1 |
Component: | Administration | Keywords: | has-patch 2nd-opinion |
Focuses: | Cc: |
Description
...instead of querying the DB every time. Should check $category_cache for post id, and return if found, query if not found.
Per discussion here:
Attachments (1)
Change History (5)
#3
@
18 years ago
- Keywords has-patch 2nd-opinion added
- Owner changed from anonymous to markjaquith
- Status changed from new to assigned
Alex, Ryan, check the patch I uploaded. Instead of duplicating get_the_category
code, I just called it in here. get_the_category
returns a blank array, so that shouldn't be an issue for posts with no categories (or non-existent posts).
Note: See
TracTickets for help on using
tickets.
Note: helps with for backward compatibility with 2.0.x.