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

@@ -673,7 +673,7 @@ function get_post_stati( $args = array(), $output = 'names', $operator = 'and' )
* @return bool Whether post type is hierarchical.
*/
function is_post_type_hierarchical( $post_type ) {
if ( ! is_post_type( $post_type ) )
if ( ! post_type_exists( $post_type ) )
return false;
$post_type = get_post_type_object( $post_type );
@@ -684,12 +684,12 @@ function is_post_type_hierarchical( $post_type ) {
* Checks if a post type is registered.
*
* @since 3.0.0
* @uses get_post_type()
* @uses get_post_type_object()
*
* @param string Post type name
* @return bool Whether post type is registered.
*/
function is_post_type( $post_type ) {
function post_type_exists( $post_type ) {
return (bool) get_post_type_object( $post_type );
}