classes/PodsForm.php
public static function field_types() {

		$field_types = array(
			'text',
			'website',
			// 'link',
			'phone',
			'email',
			'password',
			'paragraph',
			'wysiwyg',
			'code',
			'datetime',
			'date',
			'time',
			'number',
			'currency',
			'file',
			'avatar',
			'oembed',
			'pick',
			'boolean',
			'color',
			'slug',
		);

		$field_types = array_merge( $field_types, array_keys( self::$field_types ) );

		$field_types = array_filter( array_unique( $field_types ) );

		$types = apply_filters( 'pods_api_field_types', $field_types );

		$field_types = pods_transient_get( 'pods_field_types' );

		if ( empty( $field_types ) || count( $types ) != count( $field_types ) ) {
			$field_types = array();

			foreach ( $types as $field_type ) {
				$file = null;

				if ( isset( self::$field_types[ $field_type ] ) ) {
					$file = self::$field_types[ $field_type ]['file'];
				}

				self::field_loader( $field_type, $file );

				if ( ! isset( self::$loaded[ $field_type ] ) || ! is_object( self::$loaded[ $field_type ] ) ) {
					continue;
				}

				$class_vars = get_class_vars( get_class( self::$loaded[ $field_type ] ) );
				// PHP 5.2.x workaround
				$field_types[ $field_type ]         = $class_vars;
				$field_types[ $field_type ]['file'] = $file;
			}

			self::$field_types = $field_types;

			pods_transient_set( 'pods_field_types', self::$field_types );
		} else {
			self::$field_types = array_merge( $field_types, self::$field_types );
		}//end if

		return self::$field_types;
	}
public static function field_types() {

		$field_types = array(
			'text',
			'website',
			// 'link',
			'phone',
			'email',
			'password',
			'paragraph',
			'wysiwyg',
			'code',
			'datetime',
			'date',
			'time',
			'number',
			'currency',
			'file',
			'avatar',
			'oembed',
			'pick',
			'boolean',
			'color',
			'slug',
		);

		$field_types = array_merge( $field_types, array_keys( self::$field_types ) );

		$field_types = array_filter( array_unique( $field_types ) );

		$types = apply_filters( 'pods_api_field_types', $field_types );

		$field_types = pods_transient_get( 'pods_field_types' );

		if ( empty( $field_types ) || count( $types ) != count( $field_types ) ) {
			$field_types = array();

			foreach ( $types as $field_type ) {
				$file = null;

				if ( isset( self::$field_types[ $field_type ] ) ) {
					$file = self::$field_types[ $field_type ]['file'];
				}

				self::field_loader( $field_type, $file );

				if ( ! isset( self::$loaded[ $field_type ] ) || ! is_object( self::$loaded[ $field_type ] ) ) {
					continue;
				}

				$class_vars = get_class_vars( get_class( self::$loaded[ $field_type ] ) );
				// PHP 5.2.x workaround
				$field_types[ $field_type ]         = $class_vars;
				$field_types[ $field_type ]['file'] = $file;
			}

			self::$field_types = $field_types;

			pods_transient_set( 'pods_field_types', self::$field_types );
		} else {
			self::$field_types = array_merge( $field_types, self::$field_types );
		}//end if

		return self::$field_types;
	}
public static function field_types ( ) { $ field_types = array ( 'text' , 'website' , // 'link', 'phone' , 'email' , 'password' , 'paragraph' , 'wysiwyg' , 'code' , 'datetime' , 'date' , 'time' , 'number' , 'currency' , 'file' , 'avatar' , 'oembed' , 'pick' , 'boolean' , 'color' , 'slug' , ) ; $ field_types = array_merge ( $ field_types , array_keys ( self :: $ field_types ) ) ; $ field_types = array_filter ( array_unique ( $ field_types ) ) ; $ types = apply_filters ( 'pods_api_field_types' , $ field_types ) ; $ field_types = pods_transient_get ( 'pods_field_types' ) ; if ( empty ( $ field_types ) || count ( $ types ) != count ( $ field_types ) ) { $ field_types = array ( ) ; foreach ( $ types as $ field_type ) { $ file = null ; if ( isset ( self :: $ field_types [ $ field_type ] ) ) { $ file = self :: $ field_types [ $ field_type ] [ 'file' ] ; } self :: field_loader ( $ field_type , $ file ) ; if ( ! isset ( self :: $ loaded [ $ field_type ] ) || ! is_object ( self :: $ loaded [ $ field_type ] ) ) { continue ; } $ class_vars = get_class_vars ( get_class ( self :: $ loaded [ $ field_type ] ) ) ; // PHP 5.2.x workaround $ field_types [ $ field_type ] = $ class_vars ; $ field_types [ $ field_type ] [ 'file' ] = $ file ; } self :: $ field_types = $ field_types ; pods_transient_set ( 'pods_field_types' , self :: $ field_types ) ; } else { self :: $ field_types = array_merge ( $ field_types , self :: $ field_types ) ; } //end if return self :: $ field_types ; }
Get a list of all available field types and include

@return array Registered Field Types data

@since 2.3.0
Get a list of all available field types and include