classes/PodsAdmin.php
public function configuration( $pod = null, $full_field_info = false ) {

		$api = pods_api();

		if ( null === $pod ) {
			$the_pods = $api->load_pods();
		} elseif ( is_array( $pod ) ) {
			foreach ( $pod as $p ) {
				$the_pods[] = $api->load_pod( $p );
			}
		} else {
			$the_pods[] = $api->load_pod( $pod );
		}

		foreach ( $the_pods as $the_pod ) {
			$configuration[ $the_pod['name'] ] = array(
				'name'    => $the_pod['name'],
				'ID'      => $the_pod['id'],
				'storage' => $the_pod['storage'],
				'fields'  => $the_pod['fields'],
			);
		}

		if ( ! $full_field_info ) {
			foreach ( $the_pods as $the_pod ) {
				$fields = $configuration[ $the_pod['name'] ]['fields'];

				unset( $configuration[ $the_pod['name'] ]['fields'] );

				foreach ( $fields as $field ) {
					$info = array(
						'name' => $field['name'],
						'type' => $field['type'],
					);

					if ( 'pick' === $info['type'] ) {
						$info['pick_object'] = $field['pick_object'];

						if ( isset( $field['pick_val'] ) && '' !== $field['pick_val'] ) {
							$info['pick_val'] = $field['pick_val'];
						}
					}

					if ( is_array( $info ) ) {
						$configuration[ $the_pod['name'] ]['fields'][ $field['name'] ] = $info;
					}

					unset( $info );

				}//end foreach
			}//end foreach
		}//end if

		if ( is_array( $configuration ) ) {
			return $configuration;
		}

	}
public function configuration( $pod = null, $full_field_info = false ) {

		$api = pods_api();

		if ( null === $pod ) {
			$the_pods = $api->load_pods();
		} elseif ( is_array( $pod ) ) {
			foreach ( $pod as $p ) {
				$the_pods[] = $api->load_pod( $p );
			}
		} else {
			$the_pods[] = $api->load_pod( $pod );
		}

		foreach ( $the_pods as $the_pod ) {
			$configuration[ $the_pod['name'] ] = array(
				'name'    => $the_pod['name'],
				'ID'      => $the_pod['id'],
				'storage' => $the_pod['storage'],
				'fields'  => $the_pod['fields'],
			);
		}

		if ( ! $full_field_info ) {
			foreach ( $the_pods as $the_pod ) {
				$fields = $configuration[ $the_pod['name'] ]['fields'];

				unset( $configuration[ $the_pod['name'] ]['fields'] );

				foreach ( $fields as $field ) {
					$info = array(
						'name' => $field['name'],
						'type' => $field['type'],
					);

					if ( 'pick' === $info['type'] ) {
						$info['pick_object'] = $field['pick_object'];

						if ( isset( $field['pick_val'] ) && '' !== $field['pick_val'] ) {
							$info['pick_val'] = $field['pick_val'];
						}
					}

					if ( is_array( $info ) ) {
						$configuration[ $the_pod['name'] ]['fields'][ $field['name'] ] = $info;
					}

					unset( $info );

				}//end foreach
			}//end foreach
		}//end if

		if ( is_array( $configuration ) ) {
			return $configuration;
		}

	}
public function configuration ( $ pod = null , $ full_field_info = false ) { $ api = pods_api ( ) ; if ( null === $ pod ) { $ the_pods = $ api -> load_pods ( ) ; } elseif ( is_array ( $ pod ) ) { foreach ( $ pod as $ p ) { $ the_pods [ ] = $ api -> load_pod ( $ p ) ; } } else { $ the_pods [ ] = $ api -> load_pod ( $ pod ) ; } foreach ( $ the_pods as $ the_pod ) { $ configuration [ $ the_pod [ 'name' ] ] = array ( 'name' => $ the_pod [ 'name' ] , 'ID' => $ the_pod [ 'id' ] , 'storage' => $ the_pod [ 'storage' ] , 'fields' => $ the_pod [ 'fields' ] , ) ; } if ( ! $ full_field_info ) { foreach ( $ the_pods as $ the_pod ) { $ fields = $ configuration [ $ the_pod [ 'name' ] ] [ 'fields' ] ; unset ( $ configuration [ $ the_pod [ 'name' ] ] [ 'fields' ] ) ; foreach ( $ fields as $ field ) { $ info = array ( 'name' => $ field [ 'name' ] , 'type' => $ field [ 'type' ] , ) ; if ( 'pick' === $ info [ 'type' ] ) { $ info [ 'pick_object' ] = $ field [ 'pick_object' ] ; if ( isset ( $ field [ 'pick_val' ] ) && '' !== $ field [ 'pick_val' ] ) { $ info [ 'pick_val' ] = $ field [ 'pick_val' ] ; } } if ( is_array ( $ info ) ) { $ configuration [ $ the_pod [ 'name' ] ] [ 'fields' ] [ $ field [ 'name' ] ] = $ info ; } unset ( $ info ) ; } //end foreach } //end foreach } //end if if ( is_array ( $ configuration ) ) { return $ configuration ; } }
Profiles the Pods configuration

@param null|string|array $pod             Which Pod(s) to get configuration for. Can be a the name
of one Pod, or an array of names of Pods, or null, which is the
default, to profile all Pods.
@param bool              $full_field_info If true all info about each field is returned. If false,
which is the default only name and type, will be returned.

@return array

@since 2.7.0
Profiles the Pods configuration