Opened 14 years ago
Closed 14 years ago
#19671 closed enhancement (fixed)
Only retrieve categories list if post type supports categories
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 3.4 | Priority: | normal |
| Severity: | minor | Version: | 3.3 |
| Component: | Performance | Keywords: | has-patch commit |
| Focuses: | Cc: |
Description
The get_the_category_list function attempts to pull a list of categories before it checks if a category relationship applies to the current post_type. Attached patch moves the category retrieval down a few lines: after we've determined a category relationship could exist.
Before
- Fetch and assign all categories to a variable
- Test if post type uses categories
After
- Test if post type uses categories
- Fetch and assign all categories to a variable
Saves fetch time and filtering for post types without a category relationship.
Attachments (1)
Change History (4)
Note: See
TracTickets for help on using
tickets.
attempt to fetch categories if categories applicable for post type