Deprecate is_term, is_taxonomy, is_post_type for *_exists(). Props nacin. fixes #13747

git-svn-id: https://develop.svn.wordpress.org/trunk@15220 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2010-06-11 15:53:41 +00:00
parent 9c74b84590
commit fc2793bd46
9 changed files with 94 additions and 40 deletions

View File

@@ -2513,3 +2513,53 @@ function trackback_rdf($deprecated = '') {
_deprecated_function( __FUNCTION__, '3.0' );
return '';
}
/**
* Checks if a post type is registered.
*
* @since 3.0.0
* @deprecated 3.0.0
* @deprecated Use post_type_exists()
* @see post_type_exists()
*
* @param string Post type name
* @return bool Whether post type is registered.
*/
function is_post_type( $post_type ) {
_deprecated_function( __FUNCTION__, '3.0', 'post_type_exists()' );
return post_type_exists( $post_type );
}
/**
* Checks that the taxonomy name exists.
*
* @since 2.3.0
* @deprecated 3.0.0
* @deprecated Use taxonomy_exists()
* @see taxonomy_exists()
*
* @param string $taxonomy Name of taxonomy object
* @return bool Whether the taxonomy exists.
*/
function is_taxonomy( $taxonomy ) {
_deprecated_function( __FUNCTION__, '3.0', 'taxonomy_exists()' );
return taxonomy_exists( $post_type );
}
/**
* Check if Term exists.
*
* @since 2.3.0
* @deprecated 3.0.0
* @deprecated Use term_exists()
* @see term_exists()
*
* @param int|string $term The term to check
* @param string $taxonomy The taxonomy name to use
* @param int $parent ID of parent term under which to confine the exists search.
* @return mixed Get the term id or Term Object, if exists.
*/
function is_term( $term, $taxonomy = '', $parent = 0 ) {
_deprecated_function( __FUNCTION__, '3.0', 'term_exists()' );
return term_exists( $term, $taxonomy, $parent );
}