classes/PodsAPI.php
public function pod_exists( $params, $type = null ) {

		if ( is_string( $params ) ) {
			$params = array( 'name' => $params );
		}

		$params = (object) pods_sanitize( $params );

		if ( ! empty( $params->id ) || ! empty( $params->name ) ) {
			if ( ! isset( $params->name ) ) {
				$dummy = (int) $params->id;
				$pod   = get_post( $dummy );
			} else {
				$pod = get_posts( array(
					'name'           => $params->name,
					'post_type'      => '_pods_pod',
					'posts_per_page' => 1
				) );

				if ( is_array( $pod ) && ! empty( $pod[0] ) ) {
					$pod = $pod[0];
				}
			}

			if ( ! empty( $pod ) && ( empty( $type ) || $type == get_post_meta( $pod->ID, 'type', true ) ) ) {
				return true;
			}
		}

		return false;
	}
public function pod_exists( $params, $type = null ) {

		if ( is_string( $params ) ) {
			$params = array( 'name' => $params );
		}

		$params = (object) pods_sanitize( $params );

		if ( ! empty( $params->id ) || ! empty( $params->name ) ) {
			if ( ! isset( $params->name ) ) {
				$dummy = (int) $params->id;
				$pod   = get_post( $dummy );
			} else {
				$pod = get_posts( array(
					'name'           => $params->name,
					'post_type'      => '_pods_pod',
					'posts_per_page' => 1
				) );

				if ( is_array( $pod ) && ! empty( $pod[0] ) ) {
					$pod = $pod[0];
				}
			}

			if ( ! empty( $pod ) && ( empty( $type ) || $type == get_post_meta( $pod->ID, 'type', true ) ) ) {
				return true;
			}
		}

		return false;
	}
public function pod_exists ( $ params , $ type = null ) { if ( is_string ( $ params ) ) { $ params = array ( 'name' => $ params ) ; } $ params = ( object ) pods_sanitize ( $ params ) ; if ( ! empty ( $ params -> id ) || ! empty ( $ params -> name ) ) { if ( ! isset ( $ params -> name ) ) { $ dummy = ( int ) $ params -> id ; $ pod = get_post ( $ dummy ) ; } else { $ pod = get_posts ( array ( 'name' => $ params -> name , 'post_type' => '_pods_pod' , 'posts_per_page' => 1 ) ) ; if ( is_array ( $ pod ) && ! empty ( $ pod [ 0 ] ) ) { $ pod = $ pod [ 0 ] ; } } if ( ! empty ( $ pod ) && ( empty ( $ type ) || $ type == get_post_meta ( $ pod -> ID , 'type' , true ) ) ) { return true ; } } return false ; }
Check if a Pod exists

$params['id'] int Pod ID
$params['name'] string Pod name

@param array $params An associative array of parameters

@return bool True if exists

@since 1.12
Check if a Pod exists