Changeset 11031
- Timestamp:
- 04/21/2009 07:42:28 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/category.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/category.php
r10959 r11031 201 201 */ 202 202 function cat_is_ancestor_of( $cat1, $cat2 ) { 203 if ( is_int( $cat1) )203 if ( ! isset($cat1->term_id) ) 204 204 $cat1 = &get_category( $cat1 ); 205 if ( is_int( $cat2) )205 if ( ! isset($cat2->parent) ) 206 206 $cat2 = &get_category( $cat2 ); 207 207 208 if ( !$cat1->term_id || !$cat2->parent)208 if ( empty($cat1->term_id) || empty($cat2->parent) ) 209 209 return false; 210 211 210 if ( $cat2->parent == $cat1->term_id ) 212 211 return true;
Note: See TracChangeset
for help on using the changeset viewer.