Introduce WP_Post class. Clean up ancestors handling. Props scribu, toppa. fixes #10381 see #21309

git-svn-id: https://develop.svn.wordpress.org/trunk@21559 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2012-08-20 19:47:52 +00:00
parent 453941f725
commit 30218d5ea5
6 changed files with 167 additions and 116 deletions
-2
View File
@@ -286,8 +286,6 @@ function _wp_menu_item_classes_by_context( &$menu_items ) {
}
}
}
} elseif ( ! empty( $queried_object->post_type ) && is_post_type_hierarchical( $queried_object->post_type ) ) {
_get_post_ancestors( $queried_object );
} elseif ( ! empty( $queried_object->taxonomy ) && is_taxonomy_hierarchical( $queried_object->taxonomy ) ) {
$term_hierarchy = _get_term_hierarchy( $queried_object->taxonomy );
$term_to_ancestor = array();