WordPress.org

Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#13346 closed defect (bug) (fixed)

Object term relationships fetched and updated for taxonomies not supported by post type

Reported by: ryan Owned by:
Milestone: 3.0 Priority: normal
Severity: blocker Version:
Component: Menus Keywords:
Focuses: Cc:

Description

This is easily seen when updating menu items. Even though objects of type nav_menu_item only support the nav_menu taxonomy, wp_set_post_categories() and wp_set_post_tags() are called. wp_get_single_post() also calls wp_get_post_categories() and wp_get_post_tags(). These should be wrapped in is_object_in_taxonomy() checks.

Change History (3)

#1 @ryan
8 years ago

  • Summary changed from Object term relationships fetched and updated for taxonomies not support by post type to Object term relationships fetched and updated for taxonomies not supported by post type

#2 @ryan
8 years ago

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

(In [14561]) Don't set/get tags or categories for post types that do not support them. fixes #13346

#3 @ryan
8 years ago

Eliminates four queries per menu item when saving a menu.

Note: See TracTickets for help on using tickets.