classes/fields/pick.php
public function get_field_data( $field, $options = array(), $object_params = array() ) {

		// Handle field array overrides.
		if ( is_array( $field ) ) {
			$options = array_merge( $field, $options );
		}

		// Get field name from array.
		$field = pods_v( 'name', $options, $field, true );

		// Field name or options not set.
		if ( empty( $field ) || empty( $options ) ) {
			return array();
		}

		// Options normalization.
		$options = array_merge( $options, pods_v( 'options', $options, array(), true ) );

		// Setup object params.
		$object_params = array_merge(
			array(
				// The name of the field.
				'name'    => $field,
				// Field options.
				'options' => $options,
			), $object_params
		);

		// Get data override.
		$data = pods_v( 'data', $options, null, true );

		if ( null !== $data ) {
			// Return data override.
			$data = (array) $data;
		} else {
			// Get object data.
			$data = $this->get_object_data( $object_params );
		}

		return $data;

	}
public function get_field_data( $field, $options = array(), $object_params = array() ) {

		// Handle field array overrides.
		if ( is_array( $field ) ) {
			$options = array_merge( $field, $options );
		}

		// Get field name from array.
		$field = pods_v( 'name', $options, $field, true );

		// Field name or options not set.
		if ( empty( $field ) || empty( $options ) ) {
			return array();
		}

		// Options normalization.
		$options = array_merge( $options, pods_v( 'options', $options, array(), true ) );

		// Setup object params.
		$object_params = array_merge(
			array(
				// The name of the field.
				'name'    => $field,
				// Field options.
				'options' => $options,
			), $object_params
		);

		// Get data override.
		$data = pods_v( 'data', $options, null, true );

		if ( null !== $data ) {
			// Return data override.
			$data = (array) $data;
		} else {
			// Get object data.
			$data = $this->get_object_data( $object_params );
		}

		return $data;

	}
public function get_field_data ( $ field , $ options = array ( ) , $ object_params = array ( ) ) { // Handle field array overrides. if ( is_array ( $ field ) ) { $ options = array_merge ( $ field , $ options ) ; } // Get field name from array. $ field = pods_v ( 'name' , $ options , $ field , true ) ; // Field name or options not set. if ( empty ( $ field ) || empty ( $ options ) ) { return array ( ) ; } // Options normalization. $ options = array_merge ( $ options , pods_v ( 'options' , $ options , array ( ) , true ) ) ; // Setup object params. $ object_params = array_merge ( array ( // The name of the field. 'name' => $ field , // Field options. 'options' => $ options , ) , $ object_params ) ; // Get data override. $ data = pods_v ( 'data' , $ options , null , true ) ; if ( null !== $ data ) { // Return data override. $ data = ( array ) $ data ; } else { // Get object data. $ data = $ this -> get_object_data ( $ object_params ) ; } return $ data ; }
Get available items from a relationship field.

@param array|string $field         Field array or field name.
@param array        $options       Field options array overrides.
@param array        $object_params Additional get_object_data options.

@return array An array of available items from a relationship field
Get available items from a relationship field .