classes/PodsAPI.php
public function field_exists( $params ) {

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

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

			if ( ! empty( $field ) ) {
				return true;
			}
		}

		return false;
	}
public function field_exists( $params ) {

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

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

			if ( ! empty( $field ) ) {
				return true;
			}
		}

		return false;
	}
public function field_exists ( $ params ) { $ params = ( object ) pods_sanitize ( $ params ) ; if ( ( ! empty ( $ params -> id ) || ! empty ( $ params -> name ) ) && isset ( $ params -> pod_id ) && ! empty ( $ params -> pod_id ) ) { if ( ! isset ( $ params -> name ) ) { $ dummy = ( int ) $ params -> id ; $ field = get_post ( $ dummy ) ; } else { $ field = get_posts ( array ( 'name' => $ params -> name , 'post_type' => '_pods_field' , 'posts_per_page' => 1 , 'post_parent' => $ params -> pod_id ) ) ; } if ( ! empty ( $ field ) ) { return true ; } } return false ; }
Check if a Pod's field exists

$params['pod_id'] int The Pod ID
$params['id'] int The field ID
$params['name'] string The field name

@param array $params An associative array of parameters

@return bool

@since 1.12
Check if a Pod s field exists