WordPress.org

Make WordPress Core


Ignore:
Timestamp:
06/11/2010 03:53:41 PM (11 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/deprecated.php

    r13991 r15220  
    25142514    return '';
    25152515}
     2516
     2517/**
     2518 * Checks if a post type is registered.
     2519 *
     2520 * @since 3.0.0
     2521 * @deprecated 3.0.0
     2522 * @deprecated Use post_type_exists()
     2523 * @see post_type_exists()
     2524 *
     2525 * @param string Post type name
     2526 * @return bool Whether post type is registered.
     2527 */
     2528function is_post_type( $post_type ) {
     2529    _deprecated_function( __FUNCTION__, '3.0', 'post_type_exists()' );
     2530    return post_type_exists( $post_type );
     2531}
     2532
     2533/**
     2534 * Checks that the taxonomy name exists.
     2535 *
     2536 * @since 2.3.0
     2537 * @deprecated 3.0.0
     2538 * @deprecated Use taxonomy_exists()
     2539 * @see taxonomy_exists()
     2540 *
     2541 * @param string $taxonomy Name of taxonomy object
     2542 * @return bool Whether the taxonomy exists.
     2543 */
     2544function is_taxonomy( $taxonomy ) {
     2545    _deprecated_function( __FUNCTION__, '3.0', 'taxonomy_exists()' );
     2546    return taxonomy_exists( $post_type );
     2547}
     2548
     2549/**
     2550 * Check if Term exists.
     2551 *
     2552 * @since 2.3.0
     2553 * @deprecated 3.0.0
     2554 * @deprecated Use term_exists()
     2555 * @see term_exists()
     2556 *
     2557 * @param int|string $term The term to check
     2558 * @param string $taxonomy The taxonomy name to use
     2559 * @param int $parent ID of parent term under which to confine the exists search.
     2560 * @return mixed Get the term id or Term Object, if exists.
     2561 */
     2562function is_term( $term, $taxonomy = '', $parent = 0 ) {
     2563    _deprecated_function( __FUNCTION__, '3.0', 'term_exists()' );
     2564    return term_exists( $term, $taxonomy, $parent );
     2565}
Note: See TracChangeset for help on using the changeset viewer.