classes/PodsRESTFields.php
private function set_pod( $pod ) {

		if ( is_string( $pod ) ) {
			$pod = pods( $pod, null, true );

			$this->set_pod( $pod );
		} else {
			$type = $pod->pod_data['type'];

			$supported_pod_types = array(
				'post_type',
				'taxonomy',
				'media',
				'user',
				'comment',
			);

			if ( in_array( $type, $supported_pod_types, true ) ) {
				$this->pod = $pod;
			} else {
				$this->pod = false;
			}
		}//end if

	}
private function set_pod( $pod ) {

		if ( is_string( $pod ) ) {
			$pod = pods( $pod, null, true );

			$this->set_pod( $pod );
		} else {
			$type = $pod->pod_data['type'];

			$supported_pod_types = array(
				'post_type',
				'taxonomy',
				'media',
				'user',
				'comment',
			);

			if ( in_array( $type, $supported_pod_types, true ) ) {
				$this->pod = $pod;
			} else {
				$this->pod = false;
			}
		}//end if

	}
private function set_pod ( $ pod ) { if ( is_string ( $ pod ) ) { $ pod = pods ( $ pod , null , true ) ; $ this -> set_pod ( $ pod ) ; } else { $ type = $ pod -> pod_data [ 'type' ] ; $ supported_pod_types = array ( 'post_type' , 'taxonomy' , 'media' , 'user' , 'comment' , ) ; if ( in_array ( $ type , $ supported_pod_types , true ) ) { $ this -> pod = $ pod ; } else { $ this -> pod = false ; } } //end if }
Set the Pods object

@since  2.5.6

@access protected

@param string|Pods $pod Pods object or name of Pods object
Set the Pods object