X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/449d082fcc4873c1f7d363a0d9f7409be7f6e77d..4f4e083f6f77639c41e2b1ddb200de8e34301cee:/wp-includes/category.php diff --git a/wp-includes/category.php b/wp-includes/category.php index fb81dfb2..372c4c70 100644 --- a/wp-includes/category.php +++ b/wp-includes/category.php @@ -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;