]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/category.php
Wizard 2.8.2-scripts
[autoinstalls/wordpress.git] / wp-includes / category.php
index fb81dfb2b774d03bd1324e963753ab5576ffc52e..372c4c70cb770d68c70ab815a898afdd82484635 100644 (file)
@@ -172,21 +172,6 @@ function get_cat_ID( $cat_name='General' ) {
 }
 
 
-/**
- * Retrieve the category name by the category ID.
- *
- * @since 0.71
- * @deprecated Use get_cat_name()
- * @see get_cat_name() get_catname() is deprecated in favor of get_cat_name().
- *
- * @param int $cat_ID Category ID
- * @return string category name
- */
-function get_catname( $cat_ID ) {
-       return get_cat_name( $cat_ID );
-}
-
-
 /**
  * Retrieve the name of a category from its ID.
  *
@@ -215,14 +200,13 @@ function get_cat_name( $cat_id ) {
  * @return bool Whether $cat2 is child of $cat1
  */
 function cat_is_ancestor_of( $cat1, $cat2 ) {
-       if ( is_int( $cat1 ) )
+       if ( ! isset($cat1->term_id) )
                $cat1 = &get_category( $cat1 );
-       if ( is_int( $cat2 ) )
+       if ( ! isset($cat2->parent) )
                $cat2 = &get_category( $cat2 );
 
-       if ( !$cat1->term_id || !$cat2->parent )
+       if ( empty($cat1->term_id) || empty($cat2->parent) )
                return false;
-
        if ( $cat2->parent == $cat1->term_id )
                return true;